render() { return ( <Router history={history}> <Body> <Route component={Navbar} /> <Route component={ModalRoot} /> <Route component={Toasts} /> <Switch> <PrivateRoute exact path="/" component={Dashboard} /> <PrivateRoute path="/users/:username" component={Users} /> <PrivateRoute path="/users" component={Users} /> <PrivateRoute path="/communities/:slug" component={Communities} /> <PrivateRoute path="/communities" component={Communities} /> <PrivateRoute path="/threads" component={Threads} /> </Switch> </Body> </Router> ); }