footers
This commit is contained in:
parent
d65b79672f
commit
d4cd9148ae
2 changed files with 12 additions and 9 deletions
|
|
@ -74,8 +74,12 @@ export default async function Page({ params: paramsPromise }: Args) {
|
|||
|
||||
|
||||
if (decodedSlug === 'home') {
|
||||
return <HeroPage richText={hero.richText} links={hero.links} layout={layout} />
|
||||
}
|
||||
return (
|
||||
<HeroPage richText={hero.richText} links={hero.links}>
|
||||
<RenderBlocks blocks={layout} />
|
||||
</HeroPage>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ position: 'relative', minHeight: '100vh' }}>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import { useThemeMode } from '@/hooks/useThemeMode'
|
|||
import { CMSLink } from '@/components/Link'
|
||||
import RichText from '@/components/RichText'
|
||||
import type { Page } from '@/payload-types'
|
||||
import { RenderBlocks } from '@/blocks/RenderBlocks'
|
||||
import { Button } from '@/components/ui/button'
|
||||
|
||||
// ─── Types ────────────────────────────────────────────────────────────────────
|
||||
|
|
@ -285,10 +284,10 @@ function LogosSection({ isDark }: { isDark: boolean }) {
|
|||
interface HeroPageProps {
|
||||
richText?: Page['hero']['richText']
|
||||
links?: Page['hero']['links']
|
||||
layout?: Page['layout']
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
export default function HeroPage({ richText, links, layout }: HeroPageProps) {
|
||||
export default function HeroPage({ richText, links, children }: HeroPageProps) {
|
||||
const { isDark, toggle } = useThemeMode()
|
||||
|
||||
return (
|
||||
|
|
@ -304,9 +303,9 @@ export default function HeroPage({ richText, links, layout }: HeroPageProps) {
|
|||
<main>
|
||||
<HeroSection isDark={isDark} richText={richText} links={links} />
|
||||
<LogosSection isDark={isDark} />
|
||||
{layout && layout.length > 0 && (
|
||||
{children && (
|
||||
<div id="skills">
|
||||
<RenderBlocks blocks={layout} />
|
||||
{children}
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue