diff --git a/Client/src/Components/NavBar/index.jsx b/Client/src/Components/NavBar/index.jsx index a568b229d..c3ef60091 100644 --- a/Client/src/Components/NavBar/index.jsx +++ b/Client/src/Components/NavBar/index.jsx @@ -16,7 +16,7 @@ import ChevronDown from "../../assets/Images/Icon-chevron-down.png"; import { clearAuthState } from "../../Features/Auth/authSlice"; import { clearMonitorState } from "../../Features/Monitors/monitorsSlice"; -import { useDispatch } from "react-redux"; +import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; const settings = ["Profile", "Team", "Invite Colleagues", "Logout"]; @@ -37,6 +37,7 @@ function NavBar() { const [anchorElUser, setAnchorElUser] = useState(null); const dispatch = useDispatch(); const navigate = useNavigate(); + const authState = useSelector((state) => state.auth); /** * Handles opening the user menu. @@ -156,7 +157,9 @@ function NavBar() { className="icon-button-avatar" style={{ width: "25px", height: "25px" }} /> -