fix: improve loading display

This commit is contained in:
hippoz 2021-09-15 14:19:40 +03:00
parent d9129b826b
commit 9f146de154
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -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 (
<p>
Loading...