import type { ComponentPropsWithoutRef } from "react" import { Link } from "remix" import { ExternalLink } from "~/modules/dom/external-link" export type AppLinkProps = ComponentPropsWithoutRef<"a"> & { type: "internal" | "external" | "router" to: string } export function AppLink({ type, to, children, ...props }: AppLinkProps) { if (type === "internal") { return ( {children} ) } if (type === "external") { return ( {children} ) } return ( {children} ) }