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...