fix: remove react-router v7_startTransition

This commit is contained in:
DIYgod 2025-03-13 12:45:58 +08:00
parent 724ab17d1a
commit ba383ae98a
No known key found for this signature in database
2 changed files with 20 additions and 34 deletions

View File

@ -18,22 +18,15 @@ if (window.SENTRY_RELEASE) {
routerCreator = wrapCreateBrowserRouterV7(routerCreator)
}
export const router = routerCreator(
[
{
path: "/",
Component: App,
children: tree,
errorElement: <ErrorElement />,
},
{
path: "*",
element: <NotFound />,
},
],
export const router = routerCreator([
{
future: {
v7_startTransition: true,
},
path: "/",
Component: App,
children: tree,
errorElement: <ErrorElement />,
},
)
{
path: "*",
element: <NotFound />,
},
])

View File

@ -15,22 +15,15 @@ if (window.SENTRY_RELEASE) {
routerCreator = wrapCreateBrowserRouterV7(routerCreator)
}
export const router = routerCreator(
[
{
path: "/",
lazy: () => import("./App"),
children: tree,
errorElement: <ErrorElement />,
},
{
path: "*",
element: <NotFound />,
},
],
export const router = routerCreator([
{
future: {
v7_startTransition: true,
},
path: "/",
lazy: () => import("./App"),
children: tree,
errorElement: <ErrorElement />,
},
)
{
path: "*",
element: <NotFound />,
},
])