fixs, Убрал стейты для формы авторизации, переписал на форм дату

This commit is contained in:
2023-01-25 16:50:36 +03:00
parent 50f33071bb
commit 5c8a8160bd
21 changed files with 107 additions and 209 deletions

View File

@ -1,4 +1,4 @@
import React from 'react'
import React, {useEffect} from 'react'
import arrow from '../../images/arrow__login_page.png'
import medium from '../../images/medium_male_big.png'
import cross from '../../images/cross.png'
@ -18,9 +18,14 @@ const AuthForPartners = () => {
const isAuth = useSelector(selectAuth);
let navigate = useNavigate();
if (isAuth) {
navigate('/')
}
const getToken = localStorage.getItem('auth_token')
useEffect(()=> {
if (isAuth || getToken) {
navigate('/')
}
}, [getToken]);
return (
<section className='auth-partners'>