Created
January 15, 2020 20:58
-
-
Save trantus/6979da0dda61c4b1b1dc3ab4ed982cfb to your computer and use it in GitHub Desktop.
for Nikita
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 TeamsPanel from './components/Main/TeamsPanel' | |
import TeamDescriptionPanel from './components/Main/TeamDescriptionPanel.js' | |
import SignIn from './components/SignIn/SignIn.js' | |
import { Switch, Route } from 'react-router-dom' | |
import NavigationPanel from './components/Main/NavigationPanel.js' | |
import PassRecovery from './components/PassRecovery/PassRecovery' | |
import PassRecoverySuccess from './components/PassRecoverySuccess/PassRecoverySuccess' | |
export class TeamsRouter extends Component { | |
render() { | |
return ( | |
<div style={{ display: 'flex', background: "#F2F2F2" }}> | |
<NavigationPanel /> | |
<Switch> | |
<Route exact path='/teams' component={TeamsPanel} /> | |
<Route path='/teams/team' component={TeamDescriptionPanel} /> | |
</Switch> | |
</div> | |
) | |
} | |
} | |
export class UserRouter extends Component { | |
render() { | |
return ( | |
<div style={{ display: 'flex', background: "#F2F2F2" }}> | |
<NavigationPanel /> | |
<Switch> | |
<Route exact path='/users' component={Users} /> | |
<Route path='/users/user' component={User} /> | |
</Switch> | |
</div> | |
) | |
} | |
} | |
export const RootRouter = () => ( | |
<Switch> | |
<Route exact path='/' component={SignIn} /> | |
<Route path='/teams' component={TeamsRouter} /> | |
<Route path='/passrecovery' component={PassRecovery} /> | |
<Route path='/passrecoverysuccess' component={PassRecoverySuccess} /> | |
</Switch> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment