Skip to content

Commit bf54f5d

Browse files
committed
feat(error page): add error page
1 parent eb6d0fc commit bf54f5d

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Box, Button, Center } from "@chakra-ui/react";
2+
import { MdOutlineNoEncryptionGmailerrorred } from "react-icons/md";
3+
import { Link } from "react-router-dom";
4+
5+
const ErrorPage = () => {
6+
return (
7+
<Center>
8+
<Box mt="6rem" alignItems="center" className="flex flex-col">
9+
<div className="text-red-700 mb-5 flex items-center">
10+
<MdOutlineNoEncryptionGmailerrorred className="" size="2rem" />
11+
<p className="text-3xl">Unathorized Route</p>
12+
</div>
13+
<Link to="/">
14+
<Button bg="orange.700" w="5rem">
15+
Go back
16+
</Button>
17+
</Link>
18+
</Box>
19+
</Center>
20+
);
21+
};
22+
23+
export default ErrorPage;

web/src/utils/router.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { createBrowserRouter } from "react-router-dom";
22
import Layout from "../layouts/Layout";
3-
import Landing from "../components/internal-ui/Landing";
43
import BasicGen from "../features/basicGen/BasicGen";
54
import { ENDPOINTS } from "../features/constants";
65
import BugFix from "../features/bugFix/BugFix";
6+
import ErrorPage from "../components/internal-ui/ErrorPage";
77
export const router = createBrowserRouter([
88
{
99
path: "/",
1010
element: <Layout />,
11+
errorElement: <ErrorPage />,
1112
children: [
1213
{ index: true, element: <BasicGen /> },
1314
{ path: ENDPOINTS.postFix, element: <BugFix /> },

0 commit comments

Comments
 (0)