import Link from 'next/link'; export default function CustomLink({ children, href }) { // If the link is local it will start with a "/" // Otherwise it'll be something like "https://" return href.startsWith('/') || href === '' ? ( {children} ) : ( {children} ); }