-
-
Save amandeepmittal/9a7dd92a9379050ebd6084258c47f2cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Route, Switch } from 'react-router-dom'; | |
import Navbar from './components/Navbar'; | |
import Home from './components/Home'; | |
import PrivateRoutes from './components/auth/PrivateRoutes'; | |
import Signin from './components/auth/Signin'; | |
import Profile from './components/user/Profile'; | |
import Signup from './components/user/Signup'; | |
class Routes extends Component { | |
render() { | |
return ( | |
<div> | |
<Navbar /> | |
<Switch> | |
<Route exact path="/" component={Home} /> | |
<PrivateRoutes path="/user/edit/:userId" /> | |
<Route path="/user/:userId" component={Profile} /> | |
<Route path="/signup" component={Signup} /> | |
<Route path="/signin" component={Signin} /> | |
</Switch> | |
</div> | |
); | |
} | |
} | |
export default Routes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment