File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff line change 11import { createBrowserRouter } from "react-router-dom" ;
22import Layout from "../layouts/Layout" ;
3- import Landing from "../components/internal-ui/Landing" ;
43import BasicGen from "../features/basicGen/BasicGen" ;
54import { ENDPOINTS } from "../features/constants" ;
65import BugFix from "../features/bugFix/BugFix" ;
6+ import ErrorPage from "../components/internal-ui/ErrorPage" ;
77export 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 /> } ,
You can’t perform that action at this time.
0 commit comments