'use client'; import { LinkProps, Link as RadixLink } from '@radix-ui/themes'; import { useRouter } from 'next/navigation'; import { forwardRef } from 'react'; export const Link = forwardRef( ({ href, onClick, ...props }, ref) => { const router = useRouter(); return ( { event.preventDefault(); if (href) { if (event.ctrlKey || event.metaKey) { window.open(href); } else { router.push(href); } } onClick?.(event); }} {...props} /> ); }, );