From dd5ceda9864776fef432351dc5a3c8a67d5b10a4 Mon Sep 17 00:00:00 2001 From: Benno Tielen Date: Mon, 9 Mar 2026 12:10:37 +0100 Subject: [PATCH] fix: padding --- src/app/(home)/[slug]/page.tsx | 7 +++++++ 1 file changed, 7 insertions(+) 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 && ( )}