From 83b6abe4918e8f1891864a198ff5e0d6ff5e6b40 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 25 Nov 2017 18:56:21 -0800 Subject: [PATCH] Fixed: Possible cause of logout loop --- app/index.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/index.js b/app/index.js index d63fbb927..8341b0c40 100644 --- a/app/index.js +++ b/app/index.js @@ -8,7 +8,6 @@ import { Route, Redirect, } from 'react-router-dom'; -import Flex from 'shared/components/Flex'; import stores from 'stores'; import DocumentsStore from 'stores/DocumentsStore'; @@ -78,14 +77,11 @@ const Auth = ({ children }: AuthProps) => { authenticatedStores.collections.fetchAll(); } - return ( - - {children} - - ); - } else { - return ; + return {children}; } + + stores.auth.logout(); + window.location.href = BASE_URL; }; const notFoundSearch = () => ;