mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
25 lines
663 B
TypeScript
25 lines
663 B
TypeScript
import { MobileRibbons } from './Mobile/Ribbon/MobileRibbon';
|
|
import { DashboardDetailView } from './Views/DetailView';
|
|
import { DashboardEditView } from './Views/EditView';
|
|
import { useEditModeStore } from './Views/useEditModeStore';
|
|
|
|
interface DashboardProps {}
|
|
|
|
export const Dashboard = () => {
|
|
const isEditMode = useEditModeStore((x) => x.enabled);
|
|
|
|
return (
|
|
<>
|
|
{/* The following elemens are splitted because gridstack doesn't reinitialize them when using same item. */}
|
|
{isEditMode ? (
|
|
<>
|
|
<DashboardEditView />
|
|
<MobileRibbons />
|
|
</>
|
|
) : (
|
|
<DashboardDetailView />
|
|
)}
|
|
</>
|
|
);
|
|
};
|