mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 23:15:46 +01:00
✨ Add gridstack dashboard layout
This commit is contained in:
@@ -1,24 +1,29 @@
|
||||
import { Group, Stack } from '@mantine/core';
|
||||
import { useMemo } from 'react';
|
||||
import { useConfigContext } from '../../../config/provider';
|
||||
import { ServiceTile } from '../Tiles/Service/Service';
|
||||
import { CategoryType } from '../../../types/category';
|
||||
import { WrapperType } from '../../../types/wrapper';
|
||||
import { DashboardCategory } from '../Wrappers/Category/Category';
|
||||
import { DashboardSidebar } from '../Wrappers/Sidebar/Sidebar';
|
||||
import { DashboardWrapper } from '../Wrappers/Wrapper/Wrapper';
|
||||
|
||||
export const DashboardView = () => {
|
||||
const wrappers = useWrapperItems();
|
||||
const clockModule = useConfigContext().config?.integrations.clock;
|
||||
|
||||
return (
|
||||
<Group align="top" h="100%">
|
||||
{/*<DashboardSidebar location="left" />*/}
|
||||
<DashboardSidebar location="left" />
|
||||
<Stack mx={-10} style={{ flexGrow: 1 }}>
|
||||
{wrappers.map(
|
||||
(item) =>
|
||||
item.type === 'category'
|
||||
? 'category' //<DashboardCategory key={item.id} category={item as unknown as CategoryType} />
|
||||
: 'wrapper' //<DashboardWrapper key={item.id} wrapper={item as WrapperType} />
|
||||
{wrappers.map((item) =>
|
||||
item.type === 'category' ? (
|
||||
<DashboardCategory key={item.id} category={item as unknown as CategoryType} />
|
||||
) : (
|
||||
<DashboardWrapper key={item.id} wrapper={item as WrapperType} />
|
||||
)
|
||||
)}
|
||||
</Stack>
|
||||
{/*<DashboardSidebar location="right" />*/}
|
||||
<DashboardSidebar location="right" />
|
||||
</Group>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user