From f119fc78dda4d1e828dde04f378a63a93e3a0a7e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 2 Jul 2020 18:39:28 +0200 Subject: Add current progress on frontend port --- frontend/src/routes/index.js | 49 +++++++++++--------------------------------- 1 file changed, 12 insertions(+), 37 deletions(-) (limited to 'frontend/src/routes') diff --git a/frontend/src/routes/index.js b/frontend/src/routes/index.js index 119cdb54..ea703567 100644 --- a/frontend/src/routes/index.js +++ b/frontend/src/routes/index.js @@ -8,55 +8,30 @@ import NotFound from '../pages/NotFound' import Profile from '../pages/Profile' import Simulations from '../pages/Simulations' -const ProtectedComponent = component => () => - userIsLoggedIn() ? component : +const ProtectedComponent = (component) => () => (userIsLoggedIn() ? component : ) const AppComponent = ({ match }) => - userIsLoggedIn() ? ( - - ) : ( - - ) + userIsLoggedIn() ? : const ExperimentsComponent = ({ match }) => - userIsLoggedIn() ? ( - - ) : ( - - ) + userIsLoggedIn() ? : const SimulationComponent = ({ match }) => userIsLoggedIn() ? ( - + ) : ( - + ) const Routes = () => ( - - )} - /> - - - - )}/> - + + )} /> + + + + )} /> + ) -- cgit v1.2.3