import { WrapperType } from '../../../../types/wrapper'; import { Tiles } from '../../Tiles/tilesDefinitions'; import { GridstackTileWrapper } from '../../Tiles/TileWrapper'; import { useGridstack } from '../gridstack/use-gridstack'; interface DashboardWrapperProps { wrapper: WrapperType; } export const DashboardWrapper = ({ wrapper }: DashboardWrapperProps) => { const { refs, items, integrations } = useGridstack('wrapper', wrapper.id); return (
{items?.map((service) => { const { component: TileComponent, ...tile } = Tiles['service']; return ( ); })} {Object.entries(integrations).map(([k, v]) => { console.log(k); const { component: TileComponent, ...tile } = Tiles[k as keyof typeof Tiles]; return ( ); })}
); };