Skip to content

Commit b026258

Browse files
authored
Merge pull request #213 from NurElHuda/master
* 404 error page.
2 parents ec9378a + e829479 commit b026258

File tree

3 files changed

+783
-1
lines changed

3 files changed

+783
-1
lines changed

frontend/src/apps/main/entry/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const Projects = lazy(() => import("t9/apps/main/pages/projects"));
2727
const Learn = lazy(() => import("t9/apps/main/pages/learn"));
2828
const Faq = lazy(() => import("t9/apps/main/pages/faq"));
2929
const Contact = lazy(() => import("t9/apps/main/pages/contact"));
30+
const NotFound = lazy(() => import("t9/apps/main/pages/not_found"));
3031

3132
const env = getEnv();
3233

@@ -51,7 +52,7 @@ const Main = () => {
5152
<Route path="/Projects" component={Projects} />
5253
<Route path="/Contact-Us" component={Contact} />
5354
<Route path="/FAQ" component={Faq} />
54-
<Route render={() => <Redirect to="/" />} />
55+
<Route component={NotFound} />
5556
</Switch>
5657
</Suspense>
5758
</Container>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Container, Theme, makeStyles } from "@material-ui/core";
2+
import React from "react";
3+
import svg from "src/assets/svg/404.svg";
4+
5+
const useStyles = makeStyles((theme: Theme) => ({
6+
cont: {
7+
padding: 30,
8+
},
9+
root: {
10+
fontSize: 27,
11+
color: theme.palette.text.primary,
12+
display: "flex",
13+
alignContent: "center",
14+
justifyContent: "center",
15+
alignItems: "center",
16+
},
17+
}));
18+
19+
const NotFound = () => {
20+
const classes = useStyles();
21+
22+
return (
23+
<Container maxWidth="sm" className={classes.cont}>
24+
<div className="justify-content-md-center">
25+
<img width="100%" height="100%" src={svg} alt="404" />
26+
<div className={classes.root}>Page Not Found</div>
27+
</div>
28+
</Container>
29+
);
30+
};
31+
32+
export default NotFound;

0 commit comments

Comments
 (0)