fix: improve loading display
This commit is contained in:
parent
d9129b826b
commit
9f146de154
1 changed files with 3 additions and 5 deletions
|
@ -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...
|
||||
|
|
Loading…
Reference in a new issue