diff --git a/src/components/Layout/Navbar/index.tsx b/src/components/Layout/Navbar/index.tsx index 07ad6a5..0c6b066 100644 --- a/src/components/Layout/Navbar/index.tsx +++ b/src/components/Layout/Navbar/index.tsx @@ -74,6 +74,20 @@ const Navbar: React.FC = () => { }; }, []); + useEffect(() => { + if (user) { + if (isUserMentor) { + navigate('/mentor/dashboard'); + } else if (isUserAdmin) { + navigate('/admin/dashboard/mentor-applications'); + } else if (isUserMentee) { + navigate('/mentee/dashboard'); + } else { + navigate('/'); + } + } + }, [user]); + return (