From 9f146de1545a3c32bebb71a28afbe071038de086 Mon Sep 17 00:00:00 2001 From: hippoz Date: Wed, 15 Sep 2021 14:19:40 +0300 Subject: [PATCH] fix: improve loading display --- bfrontend/src/Components/Main/App.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bfrontend/src/Components/Main/App.js b/bfrontend/src/Components/Main/App.js index 5a5c566..28350c1 100644 --- a/bfrontend/src/Components/Main/App.js +++ b/bfrontend/src/Components/Main/App.js @@ -6,7 +6,7 @@ import Notification from '../UI/Notification'; import './../../Styles/App.scss'; import { useEffect, useState } from 'react'; -import { useDispatch, connect } from 'react-redux' +import { connect } from 'react-redux' import { BrowserRouter, Switch, Route } from 'react-router-dom'; import LoggedInMount from './LoggedInMount'; import FullMessage from '../UI/FullMessage'; @@ -15,13 +15,11 @@ function App({ user, fullscreenMessage }) { const [ notificationText ] = useState(''); const [ hasError ] = useState(false); - const dispatch = useDispatch(); - useEffect(() => { Authenticator.login(); - }, [dispatch]); + }, []); - if (user === null && !hasError) { + if (!user && !hasError) { return (

Loading...