Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- BrowserRouter as Router,
- Switch,
- Route
- } from "react-router-dom";
- ...
- <Router>
- <div className="App">
- <Navbar/>
- <div className="content_container">
- <Switch>
- <Route exact path="/" component={PostsLayout}/>
- <Route exact path="/login" component={LogIn}/>
- <Route exact path="/profile" component={Profile}/>
- <Route exact path="/posts/drafts" component={Drafts}/>
- <Route exact path="/posts/new" component={NewPost}/>
- <Route exact path="/posts/myposts" component={MyPosts}/>
- <Route exact path="/posts/:slug" component={PostDetails}/>
- <Route exact path='*' component={PageNotFound} />
- </Switch>
- </div>
- </div>
- </Router>
Add Comment
Please, Sign In to add comment