Last active
June 5, 2018 04:38
-
-
Save MilanRgm/18f5ecc1b2b1f83b350d24b05abf5a6c 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
//app | |
const App = props => ( | |
<Switch> | |
<UnauthenticatedRoute path="/login" name="login" component={AsyncLogin} {...props} /> | |
<UnauthenticatedRoute path="/signup" name="signup" component={AsyncSignUp} {...props} /> | |
<AuthenticatedRoute path="/" name="Home" component={AsyncHome} {...props} /> | |
</Switch> | |
); | |
//Home | |
const Home = props => ( | |
<Switch> | |
<DashboardRoute exact path="/" component={() => <div>Hello</div>} {...props} /> | |
<DashboardRoute path="/profile" name="profile" component={Profile} {...props} /> | |
</Switch> | |
); | |
//Profile | |
const Profile = props => ( | |
<Root> | |
<ProfileSidebar /> | |
<Main> | |
<Switch> | |
<Route path="general" component={General} {...props} /> | |
<Route path="company" component={Company} {...props} /> | |
<Route path="password" component={Password} {...props} /> | |
</Switch> | |
</Main> | |
</Root> | |
); | |
export default withRouter(Profile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment