|
@@ -44,10 +44,11 @@ export default function Sidebar() {
|
|
|
return {
|
|
|
path: item.path,
|
|
|
exact: item?.exact,
|
|
|
- component: <item.component />,
|
|
|
+ component: item.component,
|
|
|
}
|
|
|
})
|
|
|
const list = routesInfo.concat(...childrenList)
|
|
|
+ console.log('routes', list)
|
|
|
|
|
|
return (
|
|
|
<SidebarDiv>
|
|
@@ -64,7 +65,7 @@ export default function Sidebar() {
|
|
|
key={index}
|
|
|
path={route.path}
|
|
|
exact={route?.exact}
|
|
|
- element={route.component}
|
|
|
+ element={<route.component />}
|
|
|
/>
|
|
|
))}
|
|
|
</Routes>
|