|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
import toast, { Toaster } from 'react-hot-toast';
|
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
import jwt_decode from "jwt-decode";
|
|
|
-import { useSelector, useDispatch } from "react-redux";
|
|
|
+import { useDispatch } from "react-redux";
|
|
|
|
|
|
import { setToken } from '../Slices/tokenSlice'
|
|
|
|
|
|
@@ -21,7 +21,6 @@ import { useFormik } from 'formik';
|
|
|
import * as Yup from 'yup';
|
|
|
|
|
|
import { Service } from '../Utils/HTTP.js'
|
|
|
-// import { setToken } from '../Actions/index.js';
|
|
|
|
|
|
const LoginSchema = Yup.object().shape({
|
|
|
email: Yup
|
|
|
@@ -42,7 +41,6 @@ export function LoginCs() {
|
|
|
let navigate = useNavigate()
|
|
|
|
|
|
const [open, setOpen] = React.useState(false);
|
|
|
- const token = useSelector(state => state.token)
|
|
|
const dispatch = useDispatch();
|
|
|
const handleClose = () => false
|
|
|
|
|
|
@@ -107,7 +105,6 @@ export function LoginCs() {
|
|
|
});
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
- console.log('TOKEN: ', token)
|
|
|
if (auth.isLogged()) {
|
|
|
return navigate('/user/home')
|
|
|
}
|