mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +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">
|
||||
<BaseErrorBoundary>
|
||||
<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={
|
||||
<BaseErrorBoundary key={label}>
|
||||
<Ele />
|
||||
</BaseErrorBoundary>
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</Routes>
|
||||
</div>
|
||||
</div>
|
||||
</Paper>
|
||||
|
|
Loading…
Reference in New Issue
Block a user