This commit is contained in:
Mackie 2026-05-25 03:35:31 +08:00
parent 6b54da03cd
commit d65b79672f
2 changed files with 9 additions and 2 deletions

View file

@ -74,7 +74,7 @@ export default async function Page({ params: paramsPromise }: Args) {
if (decodedSlug === 'home') {
return <HeroPage richText={hero.richText} links={hero.links} />
return <HeroPage richText={hero.richText} links={hero.links} layout={layout} />
}
return (

View file

@ -10,6 +10,7 @@ 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 ────────────────────────────────────────────────────────────────────
@ -284,9 +285,10 @@ function LogosSection({ isDark }: { isDark: boolean }) {
interface HeroPageProps {
richText?: Page['hero']['richText']
links?: Page['hero']['links']
layout?: Page['layout']
}
export default function HeroPage({ richText, links }: HeroPageProps) {
export default function HeroPage({ richText, links, layout }: HeroPageProps) {
const { isDark, toggle } = useThemeMode()
return (
@ -302,6 +304,11 @@ export default function HeroPage({ richText, links }: HeroPageProps) {
<main>
<HeroSection isDark={isDark} richText={richText} links={links} />
<LogosSection isDark={isDark} />
{layout && layout.length > 0 && (
<div id="skills">
<RenderBlocks blocks={layout} />
</div>
)}
</main>
</div>