Skip to content
Snippets Groups Projects
Unverified Commit 3557a776 authored by GyDi's avatar GyDi
Browse files

fix: error boundary with key

parent 97be2863
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment