diff --git a/src/features/workspace-view/index.tsx b/src/features/workspace-view/index.tsx index ef279d6..26d3f08 100644 --- a/src/features/workspace-view/index.tsx +++ b/src/features/workspace-view/index.tsx @@ -8,6 +8,7 @@ import { UserOrgDetails, getUserOrgs } from 'app/api/user'; import loader from '../../app/assets/gifs/loader.gif'; import { Navigate, useNavigate } from 'react-router-dom'; import { useSelector } from 'react-redux'; +import toast from 'react-hot-toast'; const WorkspaceView = () => { const userContext = useContext(UserContext); @@ -41,15 +42,28 @@ const WorkspaceView = () => { searchValue, ]); + const LogoutHandler= async()=>{ + try{ + localStorage.removeItem('token') + toast.success('Logout successful!'); + navigate("/login") + }catch(e){ + + } + } return (