INNER CODE UNIT · JavaScript
App
nemanjam/mern-boilerplate · client/src/App.js:19
const App = ({ logInUserWithOauth, auth, loadMe }) => {
useEffect(() => {
loadMe();
}, [loadMe]);
//redosled hookova
useEffect(() => {
if (window.location.hash === '#_=_') window.location.hash = '';
const cookieJwt = Cookies.get('x-auth-cookie');
if (cookieJwt) {
Cookies.remove('x-auth-cookie');
logInUserWithOauth(cookieJwt);
}
}, []);
useEffect(() => {
if (!auth.appLoaded && !auth.isLoading && auth.token && !auth.isAuthenticated) {