mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: add error boundary
This commit is contained in:
@@ -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