Logout
This commit is contained in:
parent
83048cf660
commit
6262a44173
@ -14,7 +14,7 @@ import AccountCircleIcon from "@mui/icons-material/AccountCircle";
|
|||||||
import SettingsIcon from "@mui/icons-material/Settings";
|
import SettingsIcon from "@mui/icons-material/Settings";
|
||||||
import LogoutIcon from "@mui/icons-material/Logout";
|
import LogoutIcon from "@mui/icons-material/Logout";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { selectIsLoggedIn, selectStatus } from "@/app/redux/auth/selectors";
|
import { selectStatus } from "@/app/redux/auth/selectors";
|
||||||
import { logout } from "@/app/redux/auth/authSlice";
|
import { logout } from "@/app/redux/auth/authSlice";
|
||||||
import { AppDispatch } from "@/app/redux/types";
|
import { AppDispatch } from "@/app/redux/types";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@ -35,7 +35,7 @@ export default function AccountMenu() {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
// Select relevant state from your auth slice
|
// Select relevant state from your auth slice
|
||||||
const isLoggedIn = useSelector(selectIsLoggedIn);
|
// const isLoggedIn = useSelector(selectIsLoggedIn);
|
||||||
const authStatus = useSelector(selectStatus);
|
const authStatus = useSelector(selectStatus);
|
||||||
|
|
||||||
// Determine if we're currently in the process of logging out
|
// Determine if we're currently in the process of logging out
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user