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