mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 07:55:52 +01:00
✨ Add new config format
This commit is contained in:
16
src/components/Dashboard/Dashboard.tsx
Normal file
16
src/components/Dashboard/Dashboard.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { DashboardDetailView } from './Views/DetailView';
|
||||
import { DashboardEditView } from './Views/EditView';
|
||||
import { useEditModeStore } from './Views/store';
|
||||
|
||||
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 /> : <DashboardDetailView />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user