Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Routes = () => {
- return (
- <BrowserRouter>
- <div>
- <Route path="/" component={Navbar} />
- <Switch>
- <Route exact path="/" component={Main} />
- <Route path="/signin" component={SignIn} />
- <Route path="/signup" component={SignUp} />
- <PrivateRoute path="/dashboard" component={DashboardRoutes} />
- <Route path="*" component={() => <h1>Page not found</h1>} />
- </Switch>
- </div>
- <div>
- <Route path="/" component={Footer} />
- </div>
- </BrowserRouter>
- );
- };
- const Routes = () => {
- return (
- <BrowserRouter>
- <div>
- {!isAuthenticated() && <Route path="/" component={Navbar} />}
- <Switch>
- <Route exact path="/" component={Main} />
- <Route path="/signin" component={SignIn} />
- <Route path="/signup" component={SignUp} />
- <PrivateRoute path="/dashboard" component={DashboardRoutes} />
- <Route path="*" component={() => <h1>Page not found</h1>} />
- </Switch>
- </div>
- <div>
- <Route path="/" component={Footer} />
- </div>
- </BrowserRouter>
- );
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement