[WEB-5040] feat: admin react-router migration (#7922)

This commit is contained in:
Aaron 2025-11-06 00:09:35 -08:00 committed by GitHub
parent 545bfa203e
commit 315e1d5eb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 2452 additions and 798 deletions

View file

@ -0,0 +1,24 @@
"use client";
import React from "react";
import { Link as RRLink } from "react-router";
import { ensureTrailingSlash } from "./helper";
type NextLinkProps = React.ComponentProps<"a"> & {
href: string;
replace?: boolean;
prefetch?: boolean; // next.js prop, ignored
scroll?: boolean; // next.js prop, ignored
shallow?: boolean; // next.js prop, ignored
};
const Link: React.FC<NextLinkProps> = ({
href,
replace,
prefetch: _prefetch,
scroll: _scroll,
shallow: _shallow,
...rest
}) => <RRLink to={ensureTrailingSlash(href)} replace={replace} {...rest} />;
export default Link;