From 19033b8460cb43dc2fa34a2cffa932b5efe111ca Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Sat, 19 Aug 2017 15:39:58 +0200 Subject: Add profile page --- src/routes/index.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/routes/index.js') diff --git a/src/routes/index.js b/src/routes/index.js index 6257017e..af1b70b5 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -3,19 +3,17 @@ import {BrowserRouter, Redirect, Route, Switch} from "react-router-dom"; import {userIsLoggedIn} from "../auth/index"; import Home from "../pages/Home"; import NotFound from "../pages/NotFound"; +import Profile from "../pages/Profile"; import Simulations from "../pages/Simulations"; +const ProtectedComponent = (component) => () => userIsLoggedIn() ? component : ; + const Routes = () => ( - ( - userIsLoggedIn() ? ( - - ) : ( - - ) - )}/> + )}/> + )}/> -- cgit v1.2.3