mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: error boundary with key
This commit is contained in:
parent
97be28638b
commit
3557a77645
|
@ -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 key={label} path={link} element={<Ele />} />
|
<Route
|
||||||
|
key={label}
|
||||||
|
path={link}
|
||||||
|
element={
|
||||||
|
<BaseErrorBoundary key={label}>
|
||||||
|
<Ele />
|
||||||
|
</BaseErrorBoundary>
|
||||||
|
}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</Routes>
|
</Routes>
|
||||||
</BaseErrorBoundary>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user