"use client"; import { forwardRef } from "react"; import { useNavigation } from "./context"; interface AppLinkProps extends React.AnchorHTMLAttributes { href: string; } export const AppLink = forwardRef( function AppLink({ href, children, onClick, ...props }, ref) { const { push, openInNewTab } = useNavigation(); const handleClick = (e: React.MouseEvent) => { if (e.metaKey || e.ctrlKey || e.shiftKey) { if (openInNewTab) { e.preventDefault(); openInNewTab(href); } return; } e.preventDefault(); onClick?.(e); push(href); }; return ( {children} ); }, );