Files
pterodactyl-panel/resources/scripts/router/NavLink.tsx
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

17 lines
511 B
TypeScript

import React from 'react';
import { Link } from '@tanstack/react-router';
interface Props extends Omit<React.ComponentProps<'a'>, 'href'> {
to: string;
params?: Record<string, string>;
exact?: boolean;
hash?: string;
}
/** Untyped <Link> for menus whose `to` is built at runtime. */
const NavLink = ({ to, params, exact = false, ...rest }: Props) => (
<Link to={to as never} params={params as never} activeOptions={{ exact, includeSearch: false }} {...rest} />
);
export default NavLink;