diff --git a/servers/nextjs/app/(presentation-generator)/template-preview/page.tsx b/servers/nextjs/app/(presentation-generator)/template-preview/page.tsx index b51955a8..8c7f9fbc 100644 --- a/servers/nextjs/app/(presentation-generator)/template-preview/page.tsx +++ b/servers/nextjs/app/(presentation-generator)/template-preview/page.tsx @@ -13,7 +13,7 @@ const LayoutPreview = () => { getAllGroups, getLayoutsByGroup, getGroupSetting, - + getFullDataByGroup, loading, error, } = useLayout(); @@ -112,6 +112,7 @@ const LayoutPreview = () => { const meta = summaryMap[group.groupName]; const displayName = isCustom && meta?.name ? meta.name : group.groupName; const displayDescription = isCustom && meta?.description ? meta.description : group.settings.description; + const layoutGroup = getFullDataByGroup(group.groupName); return ( { router.push(`/template-preview/${group.groupName}`) }} > +

@@ -136,17 +138,28 @@ const LayoutPreview = () => {

{displayDescription}

-
- - {group.layouts.length} layout - {group.layouts.length !== 1 ? "s" : ""} - - {group.settings.default && ( - - Default - - )} -
+
+ {layoutGroup && + layoutGroup?.slice(0, 4).map((layout: any, index: number) => { + const { + component: LayoutComponent, + sampleData, + layoutId, + groupName, + } = layout; + return ( +
+
+
+ +
+
+ ); + })} +
);