Added prettier format imports
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
import {useDispatch, useSelector} from "react-redux";
|
||||
import {getRole} from "../redux/roleSlice";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import {auth} from "../redux/outstaffingSlice";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { auth } from "../redux/outstaffingSlice";
|
||||
import { getRole } from "../redux/roleSlice";
|
||||
|
||||
export const useLogout = () => {
|
||||
const dispatch = useDispatch();
|
||||
@ -11,8 +12,8 @@ export const useLogout = () => {
|
||||
const logout = () => {
|
||||
localStorage.clear();
|
||||
dispatch(auth(false));
|
||||
navigate(userRole === 'ROLE_DEV' ? '/authdev' : '/auth')
|
||||
navigate(userRole === "ROLE_DEV" ? "/authdev" : "/auth");
|
||||
};
|
||||
|
||||
return {logout}
|
||||
};
|
||||
return { logout };
|
||||
};
|
||||
|
Reference in New Issue
Block a user