fix: place app routes inside router context
This commit is contained in:
1 parent
38bcbfc697
commit
655783b724
1 file changed
+2
-2
@@ -66,7 +66,6 @@ function AppRoutes() {
|
||||
const { brand } = useBrand()
|
||||
useEffect(() => { document.title = brand.brand_name }, [brand.brand_name])
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<PageErrorBoundary>
|
||||
<Suspense fallback={<div className="route-loading" role="status" aria-label="页面加载中"><span /></div>}>
|
||||
<Routes>
|
||||
@@ -89,7 +88,6 @@ function AppRoutes() {
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</PageErrorBoundary>
|
||||
</BrowserRouter>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -97,7 +95,9 @@ export default function App() {
|
||||
return (
|
||||
<ConfigProvider theme={theme} locale={zhCN}>
|
||||
<BrandProvider>
|
||||
<BrowserRouter>
|
||||
<AppRoutes />
|
||||
</BrowserRouter>
|
||||
</BrandProvider>
|
||||
</ConfigProvider>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user