fix: place app routes inside router context

This commit is contained in:
admin committed 2026-08-20 09:25:29 +08:00
1 parent 38bcbfc697
commit 655783b724
1 file changed
+2 -2
+2 -2
View File
@@ -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>
)