import Link from 'next/link' import { type ComponentProps, type PropsWithChildren } from 'react' export type Props = ComponentProps export default function HybridLink({ href, children, ...rest }: PropsWithChildren) { if (href && (typeof href !== 'string' || href.startsWith('/'))) return ( {children} ) else return ( {children} ) }