From b0833e3914c7655c15eadd37f39e7482bd4feeb0 Mon Sep 17 00:00:00 2001 From: shiva raj badu Date: Mon, 14 Jul 2025 14:16:06 +0545 Subject: [PATCH] fix(Nextjs/layouts): Layouts overflow --- .../components/slide_layouts/Type2Layout.tsx | 2 +- .../components/slide_layouts/Type7Layout.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx index 3a3b2dd3..aba6a0db 100644 --- a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx @@ -86,7 +86,7 @@ const Type2Layout = ({ ); - const isGridLayout = body.length === 4; + const isGridLayout = body.length >= 4; const renderContent = () => { if (design_index === 3) { diff --git a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx index 4460af64..f1831be6 100644 --- a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx @@ -47,18 +47,21 @@ const Type7Layout = ({ case 2: return 'lg:grid-cols-2'; case 3: return 'lg:grid-cols-3'; case 4: return 'lg:grid-cols-4'; + case 5: return 'lg:grid-cols-5'; + case 6: return 'lg:grid-cols-6'; + case 7: return 'lg:grid-cols-7'; // Add more cases as needed default: return 'lg:grid-cols-1'; } } - const isGridLayout = body.length === 4; + const isGridLayout = body.length >= 4; const renderContent = () => { if (isGridLayout) { return (
4 ? 'md:grid-cols-3' : 'md:grid-cols-2'} gap-4 sm:gap-6 lg:gap-8 mt-4 lg:mt-12 w-full relative group`} >