mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 04:43:44 +08:00
fix: error boundary with key
This commit is contained in:
parent
955ac92043
commit
3e4084d99c
@ -125,13 +125,19 @@ const Layout = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="the-content">
|
<div className="the-content">
|
||||||
<BaseErrorBoundary>
|
<Routes>
|
||||||
<Routes>
|
{routers.map(({ label, link, ele: Ele }) => (
|
||||||
{routers.map(({ label, link, ele: Ele }) => (
|
<Route
|
||||||
<Route key={label} path={link} element={<Ele />} />
|
key={label}
|
||||||
))}
|
path={link}
|
||||||
</Routes>
|
element={
|
||||||
</BaseErrorBoundary>
|
<BaseErrorBoundary key={label}>
|
||||||
|
<Ele />
|
||||||
|
</BaseErrorBoundary>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user