This commit is contained in:
Mackie 2026-06-03 22:59:31 +08:00
parent 3fb6e228c6
commit 0ffe479c91

View file

@ -1,26 +1,29 @@
'use client' 'use client'
import React from 'react' import React from 'react'
import { Container } from '@/components/ui/Container' // Adjust path as needed
import type { Header as HeaderType } from '@/payload-types' import type { Header as HeaderType } from '@/payload-types'
import { CMSLink } from '@/components/Link' import { CMSLink } from '@/components/Link'
export const HeaderNav: React.FC<{ data: HeaderType }> = ({ data }) => { export const HeaderNav: React.FC<{ data: HeaderType }> = ({ data }) => {
const navItems = data?.navItems || [] const navItems = data?.navItems || []
return ( return (
<nav className="flex gap-1 items-center"> <div className="border-b border-foreground/8">
{navItems.map(({ link }, i) => { <Container>
return ( <nav className="flex gap-1 items-center py-2">
<CMSLink {navItems.map(({ link }, i) => {
key={i} return (
{...link} <CMSLink
appearance="link" key={i}
className="px-4 py-2 rounded-xl text-sm text-foreground/60 hover:text-foreground hover:bg-foreground/10 transition-all" {...link}
/> appearance="link"
) className="px-4 py-2 rounded-xl text-sm text-foreground/60 hover:text-foreground hover:bg-foreground/10 transition-all"
})} />
</nav> )
})}
</nav>
</Container>
</div>
) )
} }