diff --git a/src/App.tsx b/src/App.tsx index e3b200f..b2c141c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,11 +12,12 @@ import CreateTp from "./pages/admin/CreateTp"; import BulkUsers from "./pages/admin/BulkCreateUser"; import Users from "./pages/admin/Users"; import { ToastContainer } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; function App() { - const [showNotif, setShowNotif] = useState(false); return ( + } /> @@ -31,18 +32,7 @@ function App() { } /> - - {showNotif && ( -
-
- Message sent successfully. - -
-
- )}
); } diff --git a/src/component/Navigation/Navigation.tsx b/src/component/Navigation/Navigation.tsx index 2bc2c38..e6a2b4a 100644 --- a/src/component/Navigation/Navigation.tsx +++ b/src/component/Navigation/Navigation.tsx @@ -10,6 +10,7 @@ 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; @@ -20,9 +21,7 @@ const Navigation: React.FC = ({ }: NavigationProps) => { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const toggleDrawer = () => setIsDrawerOpen(!isDrawerOpen); - const [user, setUser] = useState(null); const navigate = useNavigate(); - const [theme, setTheme] = useState( localStorage.getItem("theme") ? localStorage.getItem("theme") : "dark", ); @@ -47,7 +46,6 @@ const Navigation: React.FC = ({ if (res.data.username.trim() === "") { navigate("/login"); } - setUser(res.data); }); localStorage.setItem("theme", theme); const localTheme = localStorage.getItem("theme"); @@ -63,6 +61,7 @@ const Navigation: React.FC = ({ type="checkbox" className="drawer-toggle" checked={isDrawerOpen} + onChange={() => {}} />
{location.pathname !== "/login" && ( @@ -70,9 +69,8 @@ const Navigation: React.FC = ({
-