From 987315edb2286e3378892900777d33b988613fd4 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Tue, 21 Jul 2020 18:49:20 +0200 Subject: [PATCH] Fix endless loading screen --- src/auth/index.tsx | 13 ++----------- src/index.tsx | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/auth/index.tsx b/src/auth/index.tsx index 447631f8d..9a5349b2c 100644 --- a/src/auth/index.tsx +++ b/src/auth/index.tsx @@ -3,7 +3,6 @@ import React from "react"; import { Route, Switch } from "react-router-dom"; import Layout from "./components/Layout"; -import LoginLoading from "./components/LoginLoading"; import { newPasswordPath, passwordResetPath, @@ -33,20 +32,12 @@ export const UserContext = React.createContext({ tokenVerifyLoading: false }); -interface AuthRouterProps { - hasToken: boolean; -} - -const AuthRouter: React.FC = ({ hasToken }) => ( +const AuthRouter: React.FC = () => ( - {!hasToken ? ( - - ) : ( - - )} + diff --git a/src/index.tsx b/src/index.tsx index 4bf643631..2118f7298 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -293,7 +293,7 @@ const Routes: React.FC = () => { ) : hasToken && tokenVerifyLoading ? ( ) : ( - + )} );