score:1

const WithNavbar = () => <Layout>
  <Switch>
    <Route exact path='/about' component={About} />
    <Route exact path='/contact' component={Contact} />
    <Route exact path='/listings' component={Listings} />
    <PrivateRoute exact path='/listings/:id' component={ListingDetail} />
    <Route exact path='/login' component={Login} />
    <Route exact path='/signup' component={SignUp} />
    <Route component={NotFound} />
  </Switch>
</Layout>;

App = () => (
  <Provider store={store}>
    <Router>
      <Switch>
        <Route exact path='/' component={Home} />
        <Route component={WithNavbar} />
      </Switch>
    </Router>
  </Provider>
);

Related Query

More Query from same tag