I am trying to create a route that works as follows:
<Route path='/home' exact component={Home}/>
{loggedin &&
<DashboardLayout>
<Route path='/settings' exact component={Settings} />
<Route path='/edit' exact component={AdMaker} />
</DashboardLayout>
}
If I am logged in, the DashboardLayout is rendering which I dont want if the route is /home. What should i do? [Please recommend methods other than switch]