"use client"; import Link from "next/link"; import { forwardRef, type ComponentProps } from "react"; import { hrefFromLinkTarget, interceptAppNavigation } from "@/lib/app-navigation"; export type AppLinkProps = ComponentProps; /** * In-app link that stays on the client router when this tab's build matches * the running image, and does a document load when it does not. * * Next 16.3.1's own mismatch fallback did not fire on this host after a * deploy (see BUG-967); wrapping the destinations that actually no-op'd is * the self-heal. */ export const AppLink = forwardRef(function AppLink( { onClick, href, ...props }, ref, ) { return ( { onClick?.(event); interceptAppNavigation(event, hrefFromLinkTarget(href)); }} {...props} /> ); });