State token fix
This commit is contained in:
parent
1de2c8ee48
commit
3eaf001df7
5 changed files with 29 additions and 33 deletions
|
|
@ -6,9 +6,12 @@ export function useAuth() {
|
|||
const dispatch = useDispatch();
|
||||
const auth = useSelector(getAuth);
|
||||
|
||||
const logIn = useCallback(() => {
|
||||
return dispatch(signIn());
|
||||
}, [dispatch]);
|
||||
const logIn = useCallback(
|
||||
(state) => {
|
||||
return dispatch(signIn(state));
|
||||
},
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
const logOut = useCallback(() => {
|
||||
return dispatch(signOut());
|
||||
|
|
|
|||
Reference in a new issue