mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.0.7
- Switch redux -> Context - Remove excess packages
This commit is contained in:
parent
ebd88b3bb0
commit
65c092e4ee
14 changed files with 293 additions and 397 deletions
|
@ -5,10 +5,16 @@ import { Button } from 'reactstrap';
|
|||
import { Formik, Form, Field } from 'formik';
|
||||
import ScaleLoader from 'react-spinners/ScaleLoader';
|
||||
import AuthContext from '../Contexts/AuthContext';
|
||||
import { useHistory } from "react-router";
|
||||
|
||||
const Login = () => {
|
||||
const history = useHistory();
|
||||
let boolTrue = true;
|
||||
let { Login, loading } = useContext(AuthContext);
|
||||
let { Login, loading, user } = useContext(AuthContext);
|
||||
|
||||
if (user) {
|
||||
history.push("/dashboard");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="pageWrapper">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue