Added unauthorizedpage and path in main
This commit is contained in:
parent
cc9678f375
commit
cd2a81e7f2
2 changed files with 23 additions and 0 deletions
18
frontend/src/Pages/UnauthorizedPage.tsx
Normal file
18
frontend/src/Pages/UnauthorizedPage.tsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import Button from "../Components/Button";
|
||||
|
||||
export default function UnauthorizedPage(): JSX.Element {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-screen bg-white">
|
||||
<h1 className="text-[30px]">Unauthorized</h1>
|
||||
<a href="/">
|
||||
<Button
|
||||
text="Go to Home Page"
|
||||
onClick={(): void => {
|
||||
localStorage.clear();
|
||||
}}
|
||||
type="button"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -30,6 +30,7 @@ import AdminProjectStatistics from "./Pages/AdminPages/AdminProjectStatistics.ts
|
|||
import AdminProjectViewMemberInfo from "./Pages/AdminPages/AdminProjectViewMemberInfo.tsx";
|
||||
import AdminProjectPage from "./Pages/AdminPages/AdminProjectPage.tsx";
|
||||
import NotFoundPage from "./Pages/NotFoundPage.tsx";
|
||||
import UnauthorizedPage from "./Pages/UnauthorizedPage.tsx";
|
||||
|
||||
// This is where the routes are mounted
|
||||
const router = createBrowserRouter([
|
||||
|
@ -146,6 +147,10 @@ const router = createBrowserRouter([
|
|||
path: "/adminManageUser",
|
||||
element: <AdminManageUsers />,
|
||||
},
|
||||
{
|
||||
path: "unauthorized",
|
||||
element: <UnauthorizedPage />,
|
||||
},
|
||||
]);
|
||||
|
||||
// Semi-hacky way to get the root element
|
||||
|
|
Loading…
Add table
Reference in a new issue