auth layout page changed

This commit was merged in pull request #842.
This commit is contained in:
victorAnumudu
2024-11-06 19:42:55 +01:00
parent 6396ab33d0
commit 897864b330
10 changed files with 60 additions and 153 deletions
+3 -2
View File
@@ -11,7 +11,7 @@ import Sidebar from "./Sidebar";
export default function Layout({ children }) {
const { userDetails } = useSelector((state) => state?.userDetails); // CHECKS FOR USER Details
const { drawer } = useSelector((state) => state.drawer);
const { userJobList } = useSelector((state) => state.userJobList);
const dispatch = useDispatch();
@@ -22,13 +22,14 @@ export default function Layout({ children }) {
};
const navigate = useNavigate();
const logOut = () => {
let loginType = userDetails?.account_type == 'FULL' ? 'parent' : 'kid'
sessionStorage.clear();
localStorage.clear();
// toast.success("Come Back Soon", {
// icon: `🙂`,
// });
navigate("/login", { replace: true });
navigate(`/login/${loginType}`, {state:{loginType:userDetails?.account_type.toLowerCase()}, replace:true});
};
return (