Created
April 7, 2018 07:19
-
-
Save EdsonAlcala/a12413f3d9042bc23eba5ddf279bf774 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 from 'react'; | |
import { Switch, Route, BrowserRouter as Router } from 'react-router-dom'; | |
import Home from './containers/Home'; | |
import NewProposal from './containers/NewProposal'; | |
import ProposalDetail from './containers/ProposalDetail'; | |
import Proposals from './containers/Proposals'; | |
import Results from './containers/Results'; | |
import withLayout from './containers/Layout'; | |
const Routes = () => ( | |
<Router> | |
<Switch> | |
<Route exact path="/" component={withLayout(Home)} /> | |
<Route path="/newproposal" component={withLayout(NewProposal)} /> | |
<Route path="/proposaldetail/:proposalId" component={withLayout(ProposalDetail)} /> | |
<Route path="/proposals" component={withLayout(Proposals)} /> | |
<Route path="/results" component={withLayout(Results)} /> | |
<Route component={Home} /> | |
</Switch> | |
</Router> | |
) | |
export default Routes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment