diff --git a/apps/nextjs/src/components/board/items/item-content.tsx b/apps/nextjs/src/components/board/items/item-content.tsx index d61d05902..d27e92d44 100644 --- a/apps/nextjs/src/components/board/items/item-content.tsx +++ b/apps/nextjs/src/components/board/items/item-content.tsx @@ -27,10 +27,17 @@ const getOverflowFromKind = (kind: SectionItem["kind"]) => { return undefined; }; +const ASSUMED_VIEWPORT_WIDTH = 900; +const DEFAULT_COLUMN_COUNT = 12; + export const BoardItemContent = ({ item }: BoardItemContentProps) => { const { ref, width, height } = useElementSize(); const board = useRequiredBoard(); + const estimatedCellSize = ASSUMED_VIEWPORT_WIDTH / DEFAULT_COLUMN_COUNT; + const fallbackWidth = item.width * estimatedCellSize - 20; + const fallbackHeight = item.height * estimatedCellSize - 20; + return ( <> { }} p={0} > - + {item.advancedOptions.title?.trim() && ( (kind: TKind) => { const newlyLoadedComponent = dynamic>( widgetImports[kind].componentLoader as Loader>, { - loading: () => ( -
- -
- ), + loading: () => , }, );