mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 07:38:32 +08:00
feat: add error boundary
This commit is contained in:
1 parent
166d7ba1cf
commit
a1f819a458
5 files changed
+54
-20
No files matched your search
@@ -20,6 +20,7 @@ import LayoutControl from "@/components/layout/layout-control";
|
||||
import LayoutTraffic from "@/components/layout/layout-traffic";
|
||||
import UpdateButton from "@/components/layout/update-button";
|
||||
import useCustomTheme from "@/components/layout/use-custom-theme";
|
||||
import BaseErrorBoundary from "@/components/base/base-error-boundary";
|
||||
import getSystem from "@/utils/get-system";
|
||||
import "dayjs/locale/zh-cn";
|
||||
|
||||
@@ -137,11 +138,13 @@ const Layout = () => {
|
||||
)}
|
||||
|
||||
<div className="the-content">
|
||||
<Routes>
|
||||
{routers.map(({ label, link, ele: Ele }) => (
|
||||
<Route key={label} path={link} element={<Ele />} />
|
||||
))}
|
||||
</Routes>
|
||||
<BaseErrorBoundary>
|
||||
<Routes>
|
||||
{routers.map(({ label, link, ele: Ele }) => (
|
||||
<Route key={label} path={link} element={<Ele />} />
|
||||
))}
|
||||
</Routes>
|
||||
</BaseErrorBoundary>
|
||||
</div>
|
||||
</div>
|
||||
</Paper>
|
||||
|
||||
Reference in new issue
Block a user