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