import type { ComponentType } from 'react' import { type NavItemAnchor } from '../../config' type Props = { entry: NavItemAnchor linkComponent?: ComponentType<{ href: string; children: React.ReactNode }> } export function NavAnchor({ entry, children, linkComponent, }: React.PropsWithChildren) { const AnchorComponent = entry.url.startsWith('/') ? (linkComponent ?? 'a') : 'a' return ( {children} ) }