diff --git a/src/App.tsx b/src/App.tsx index 6cbd389..9e35c9a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,11 +2,11 @@ import { BrowserRouter as Router, Route, Routes, - // Navigate, + Navigate, } from "react-router-dom"; import "./App.css"; // import { useContext } from 'react'; -import { AuthProvider} from "./context/AuthContext"; +import { AuthProvider } from "./context/AuthContext"; import PrivateRoute from "./context/PrivateRoute"; import PageLayout from './components/pages/PageLayout'; import LoginSection from "./components/pages/auth/LoginSection"; @@ -30,18 +30,22 @@ function App() { {/* Login Routes */} } /> } /> - + {/* Protected Dashboard Routes */} - }> - }/> - }/> - }/> - }/> + }> + {/* Redirect /dashboard to /dashboard/home */} + } /> + } /> + } /> + } /> } /> + + {/* 404 Page */} } /> + ); } diff --git a/src/components/pages/dashboard/admins/ManageAdmins.tsx b/src/components/pages/dashboard/admins/ManageAdmins.tsx index 943ed16..3a4e995 100644 --- a/src/components/pages/dashboard/admins/ManageAdmins.tsx +++ b/src/components/pages/dashboard/admins/ManageAdmins.tsx @@ -172,13 +172,13 @@ const ManageAdmins: React.FC = () => {