I have a problem I'm not able to figure out the issue of. I'm not much familiar with these types of scenarios in React. I have a PrivateLayout which renders its childs inside it. Have a look at the array. PrivateLayout is working fine
const ProtectedRoutes = [
{
path: "/",
component: PrivateLayout,
children: [
{
component: Departments,
path: "/departments",
},
{
component: ActivityDashboardLayout,
path: "/admin-dashboard",
// New layout component
children: [
{
component: Alert,
path: "/alert",
},
],
},
],
},
];
PrivateLayout.jsx
What i want is, as soon as I navigate to /admin-dashboard I should have another layout that should have the same navbar. When I navigate to the nested routes of admin-dashboard, they all should render between nav and sidebar. Have a look at the image for the reference