diff --git a/src/component/Navigation/Navigation.tsx b/src/component/Navigation/Navigation.tsx index e6a2b4a..bca690c 100644 --- a/src/component/Navigation/Navigation.tsx +++ b/src/component/Navigation/Navigation.tsx @@ -10,7 +10,6 @@ import { } from "@heroicons/react/24/outline"; import { Link, useNavigate } from "react-router-dom"; import axios from "axios"; -import { ToastContainer } from "react-toastify"; interface NavigationProps { children: React.ReactElement; diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index 06566bd..10f9981 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -26,6 +26,8 @@ const LoginPage: React.FC = () => { localStorage.setItem("username", res.data.username); if (res.data.roles.includes("root")) { localStorage.setItem("root", true); + } else { + localStorage.removeItem("root"); } }); navigate(from);