From d7512ace72448242b392299cf459c9c72c8dbee5 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 11 Aug 2017 14:48:42 +0300 Subject: Get Google authentication flow working --- src/routes/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/routes') diff --git a/src/routes/index.js b/src/routes/index.js index 54dc0703..6b3a454d 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -1,5 +1,6 @@ import React from 'react'; -import {BrowserRouter, Route, Switch} from "react-router-dom"; +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 Projects from "../pages/Projects"; @@ -8,7 +9,13 @@ const Routes = () => ( - + ( + userIsLoggedIn() ? ( + + ) : ( + + ) + )}/> -- cgit v1.2.3