mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
17 lines
569 B
TypeScript
17 lines
569 B
TypeScript
import { MobileRibbons } from './Mobile/Ribbon/MobileRibbon';
|
|
import { DashboardDetailView } from './Views/DetailView';
|
|
import { DashboardEditView } from './Views/EditView';
|
|
import { useEditModeStore } from './Views/useEditModeStore';
|
|
|
|
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 /> : <DashboardDetailView />}
|
|
<MobileRibbons />
|
|
</>
|
|
);
|
|
};
|