Skip to content

Commit 52c8a29

Browse files
committed
add 404 page
1 parent e6a6cfa commit 52c8a29

File tree

5 files changed

+78
-2
lines changed

5 files changed

+78
-2
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,4 @@
8080
"devDependencies": {
8181
"gh-pages": "^3.1.0"
8282
}
83-
84-
}
83+
}

src/App.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Home from "./pages/Home/Home";
66
import Footer from "./components/Footer";
77
import COC from "./pages/COC/COC";
88
import Team from "./pages/Team/Team";
9+
import NotFoundPage from "./components/NotFoundPage/NotFound";
910

1011
const App = () => {
1112
return (
@@ -30,6 +31,9 @@ const App = () => {
3031
<Route exact path="/">
3132
<Home />
3233
</Route>
34+
<Route exact path="*">
35+
<NotFoundPage />
36+
</Route>
3337
</Switch>
3438
</CSSTransition>
3539
</TransitionGroup>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from "react";
2+
import { Link } from "react-router-dom";
3+
import { Container } from "react-bootstrap";
4+
5+
const NotFound = () => {
6+
return (
7+
<React.Fragment>
8+
<Container fluid>
9+
<Container>
10+
<div className="main-content mx-auto" id="not-found-content">
11+
<h2>404</h2>
12+
<h4>Oops! Page Not Found</h4>
13+
<p>
14+
The page you are looking for does not exist. You may have mistyped
15+
the address or the page may have moved.
16+
</p>
17+
<Link to="/">Back to Home Page</Link>
18+
</div>
19+
</Container>
20+
</Container>
21+
</React.Fragment>
22+
);
23+
};
24+
25+
export default NotFound;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#not-found-content {
2+
max-width: 600px;
3+
text-align: center;
4+
margin-bottom: 100px;
5+
6+
h2 {
7+
font-size: 18vw;
8+
color: $primary-blue;
9+
line-height: 1em;
10+
}
11+
h4 {
12+
position: relative;
13+
font-size: 1.5em;
14+
margin-bottom: 15px;
15+
color: $black;
16+
font-weight: 300;
17+
display: inline-block;
18+
}
19+
20+
p {
21+
color: $github-button-black;
22+
font-size: 1.2em;
23+
}
24+
a {
25+
border-bottom: 3px solid $primary-blue;
26+
color: $primary-blue;
27+
display: inline-block;
28+
font-size: 18px;
29+
font-weight: 600;
30+
margin: 5px;
31+
text-decoration: none;
32+
transition: all 0.3s ease;
33+
&:hover {
34+
border-bottom: 3px solid $link-blue;
35+
color: $link-blue;
36+
}
37+
}
38+
@media (max-width: 600px) {
39+
margin-bottom: 50px;
40+
p {
41+
font-size: 1em;
42+
}
43+
a {
44+
margin-top: 0px;
45+
}
46+
}
47+
}

src/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
@import "./components/Twitter/Twitter.scss";
1212
@import "./components/Footer/Footer.scss";
1313
@import "./pages/COC/COC.scss";
14+
@import "./components/NotFoundPage/NotFound.scss";

0 commit comments

Comments
 (0)