m trying to build a separate navigation bar to one of the components. I tried to move it outside the Switch element but it didn't work out well. Any suggestions?
Here is the code:
import React, { useEffect } from 'react'
import { Switch, Route } from 'react-router-dom'
const App = () => {
return (
<Provider store={store}>
<NavBar />
<Switch>
<Route exact path='/' component={Home} />
<Route exact path='/about' component={About} />
<Route exact path='/landingPageExample' component={LandingExample} />
<Route exact path='/landingPage/:username' component={Landing}/> // That the component I'm
trying to have for a different Navbar
<AuthRoute exact path='/login' component={Login} />
<AuthRoute exact path='/signup' component={Signup} />
<ProtectedRoute exact path='/editLandingPage' component={EditLandingPage} />
<ProtectedRoute exact path='/editUser' component={EditUser} />
<ProtectedRoute exact path='/editPost' component={EditPost} />
<ProtectedRoute exact path='/collectedEmails' component={Sheets} />
<Route component={NotFound} />
</Switch>
</Provider>
)
}