added new page for admin and path in main
This commit is contained in:
parent
3e000358a7
commit
d7cf291836
2 changed files with 32 additions and 0 deletions
27
frontend/src/Pages/AdminPages/AdminMenuPage.tsx
Normal file
27
frontend/src/Pages/AdminPages/AdminMenuPage.tsx
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import BasicWindow from "../../Components/BasicWindow";
|
||||||
|
|
||||||
|
function AdminMenuPage(): JSX.Element {
|
||||||
|
const content = (
|
||||||
|
<>
|
||||||
|
<h1 className="font-bold text-[30px] mb-[20px]">Administrator Menu</h1>
|
||||||
|
<div className="border-4 border-black bg-white flex flex-col items-center justify-center min-h-[65vh] h-fit w-[50vw] rounded-3xl content-center overflow-scroll space-y-[10vh] p-[30px]">
|
||||||
|
<Link to="/admin-users-page">
|
||||||
|
<h1 className="font-bold underline text-[30px] cursor-pointer">
|
||||||
|
Manage Users
|
||||||
|
</h1>
|
||||||
|
</Link>
|
||||||
|
<Link to="/admin-projects-page">
|
||||||
|
<h1 className="font-bold underline text-[30px] cursor-pointer">
|
||||||
|
Manage Projects
|
||||||
|
</h1>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
const buttons = <></>;
|
||||||
|
|
||||||
|
return <BasicWindow username="Admin" content={content} buttons={buttons} />;
|
||||||
|
}
|
||||||
|
export default AdminMenuPage;
|
|
@ -5,6 +5,7 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||||
import LoginPage from "./Pages/LoginPage.tsx";
|
import LoginPage from "./Pages/LoginPage.tsx";
|
||||||
import YourProjectsPage from "./Pages/YourProjectsPage.tsx";
|
import YourProjectsPage from "./Pages/YourProjectsPage.tsx";
|
||||||
import UserProjectPage from "./Pages/UserPages/UserProjectPage.tsx";
|
import UserProjectPage from "./Pages/UserPages/UserProjectPage.tsx";
|
||||||
|
import AdminMenuPage from "./Pages/AdminPages/AdminMenuPage.tsx";
|
||||||
|
|
||||||
// This is where the routes are mounted
|
// This is where the routes are mounted
|
||||||
const router = createBrowserRouter([
|
const router = createBrowserRouter([
|
||||||
|
@ -20,6 +21,10 @@ const router = createBrowserRouter([
|
||||||
path: "/project",
|
path: "/project",
|
||||||
element: <UserProjectPage />,
|
element: <UserProjectPage />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/admin-menu",
|
||||||
|
element: <AdminMenuPage />,
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Semi-hacky way to get the root element
|
// Semi-hacky way to get the root element
|
||||||
|
|
Loading…
Reference in a new issue