From 617f344fb86b15dc4a8c240ace2d62cc5938e617 Mon Sep 17 00:00:00 2001 From: Malo BEAUCHAMPS Date: Fri, 18 Oct 2024 17:54:19 +0200 Subject: [PATCH] feat: removed --- src/component/Navigation/Navigation.tsx | 1 - src/pages/Login.tsx | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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);