fix: padding
This commit is contained in:
parent
3a5b982bf7
commit
dd5ceda986
1 changed files with 7 additions and 0 deletions
|
|
@ -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 && <Section padding={'medium'} />}
|
||||
|
||||
{page.content && page.content.length > 0 && (
|
||||
<Blocks content={page.content} />
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue