diff --git a/src/app/(home)/[slug]/page.tsx b/src/app/(home)/[slug]/page.tsx index 98cdb06..acd07a3 100644 --- a/src/app/(home)/[slug]/page.tsx +++ b/src/app/(home)/[slug]/page.tsx @@ -3,6 +3,7 @@ import { fetchPageBySlug } from '@/fetch/pages' import { Blocks } from '@/compositions/Blocks/Blocks' import { Metadata } from 'next' import { AdminMenu } from '@/components/AdminMenu/AdminMenu' +import { Section } from '@/components/Section/Section' import { isAuthenticated } from '@/utils/auth' type Props = { @@ -30,8 +31,14 @@ export default async function DynamicPage({ params }: Props) { notFound() } + const firstBlockType = page.content?.[0]?.blockType + const needsTopPadding = + firstBlockType === 'title' || firstBlockType === 'text' + return ( <> + {needsTopPadding &&
} + {page.content && page.content.length > 0 && ( )}