summaryrefslogtreecommitdiff
path: root/frontend/src/routes
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-10 10:21:46 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:01 +0200
commit8aa174e70c01631ae4e00a6d208966fcd77cf972 (patch)
tree35ec6527e8d7a0b4093e18c8cb501c293a18b5eb /frontend/src/routes
parent607e8c72d85bf79dcd9bf28df96b239e2764bc30 (diff)
Add implementation of portfolio and scenario UI structure
Diffstat (limited to 'frontend/src/routes')
-rw-r--r--frontend/src/routes/index.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/frontend/src/routes/index.js b/frontend/src/routes/index.js
index d3f50be5..96f615b1 100644
--- a/frontend/src/routes/index.js
+++ b/frontend/src/routes/index.js
@@ -9,7 +9,13 @@ import Projects from '../pages/Projects'
const ProtectedComponent = (component) => () => (userIsLoggedIn() ? component : <Redirect to="/"/>)
const AppComponent = ({ match }) =>
- userIsLoggedIn() ? <App projectId={match.params.projectId}/> : <Redirect to="/"/>
+ userIsLoggedIn() ? (
+ <App
+ projectId={match.params.projectId}
+ portfolioId={match.params.portfolioId}
+ scenarioId={match.params.scenarioId}
+ />
+ ) : <Redirect to="/"/>
const Routes = () => (
<BrowserRouter>
@@ -17,6 +23,8 @@ const Routes = () => (
<Route exact path="/" component={Home}/>
<Route exact path="/projects" render={ProtectedComponent(<Projects/>)}/>
<Route exact path="/projects/:projectId" component={AppComponent}/>
+ <Route exact path="/projects/:projectId/portfolios/:portfolioId" component={AppComponent}/>
+ <Route exact path="/projects/:projectId/portfolios/:portfolioId/scenarios/:scenarioId" component={AppComponent}/>
<Route exact path="/profile" render={ProtectedComponent(<Profile/>)}/>
<Route path="/*" component={NotFound}/>
</Switch>