Created
April 8, 2020 17:27
-
-
Save Porter97/0dadde9559bdb8a08c3e1b991700ed40 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 AuthedRoute from './AuthedRoute'; | |
import UnauthedRoute from './UnauthedRoute'; | |
#... | |
class AppRouter extends Component { | |
#... | |
render() { | |
return ( | |
#... | |
<Switch> | |
<Route exact path="/" component={() => <Home currentUser={this.props.currentUser} />} /> | |
<UnauthedRoute path="/register" component={Register} /> | |
<UnauthedRoute path="/login" component={Login} /> | |
<AuthedRoute path="/settings" component={Settings} /> | |
<AuthedRoute path="/@:username" component={Profile} /> | |
</Switch> | |
#... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment