|
@ -20,7 +20,7 @@ import { |
|
|
Outlet, |
|
|
Outlet, |
|
|
redirect, |
|
|
redirect, |
|
|
RouterProvider, |
|
|
RouterProvider, |
|
|
createHashHistory, |
|
|
|
|
|
|
|
|
// createHashHistory,
|
|
|
} from '@tanstack/react-router' |
|
|
} from '@tanstack/react-router' |
|
|
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'
|
|
|
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'
|
|
|
import { memo, useEffect, useRef } from 'react' |
|
|
import { memo, useEffect, useRef } from 'react' |
|
@ -302,11 +302,11 @@ export const RootProvider = memo((props: { context: Partial<IRootContext> }) => |
|
|
|
|
|
|
|
|
generateDynamicRoutes(menuData ?? [], layoutAuthRoute) |
|
|
generateDynamicRoutes(menuData ?? [], layoutAuthRoute) |
|
|
|
|
|
|
|
|
const hashHistory = createHashHistory() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const hashHistory = createHashHistory()
|
|
|
|
|
|
|
|
|
const router = createRouter({ |
|
|
const router = createRouter({ |
|
|
routeTree, |
|
|
routeTree, |
|
|
history: hashHistory, |
|
|
|
|
|
|
|
|
// history: hashHistory,
|
|
|
context: { queryClient, menuData: [] }, |
|
|
context: { queryClient, menuData: [] }, |
|
|
defaultPreload: 'intent', |
|
|
defaultPreload: 'intent', |
|
|
defaultPendingComponent: () => <Loading loading={true} delay={300}/> |
|
|
defaultPendingComponent: () => <Loading loading={true} delay={300}/> |
|
|