first
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Link, type LinkProps } from 'react-router';
|
||||
import { useGlobalQueryString } from '../hooks/src/useQueryState';
|
||||
|
||||
export const NavLink = (props: LinkProps) => {
|
||||
const { children, ...rest } = props;
|
||||
const queryString = useGlobalQueryString();
|
||||
|
||||
return (
|
||||
<Link {...rest} to={`${props.to}?${queryString}`}>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user