File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Blogs from '../routes/blogs';
9
9
import Blog from '../routes/blog' ;
10
10
import Contact from '../routes/contact' ;
11
11
import ContactSuccess from '../routes/contact-success' ;
12
+ import NotFoundPage from '../routes/notfound' ;
12
13
13
14
export default class App extends Component {
14
15
@@ -31,6 +32,7 @@ export default class App extends Component {
31
32
< Blog path = "/blog/:name" />
32
33
< Contact path = "/contact/" />
33
34
< ContactSuccess path = "/contact/success" />
35
+ < NotFoundPage type = "404" default />
34
36
</ Router >
35
37
</ div >
36
38
</ Provider >
Original file line number Diff line number Diff line change
1
+ import { h } from 'preact' ;
2
+ import style from './style' ;
3
+ import { Link } from 'preact-router/match' ;
4
+
5
+ const Notfound = ( ) => {
6
+
7
+ return (
8
+ < div class = { style . notfound } >
9
+ < h1 > Error 404</ h1 >
10
+ < p > That page doesn't exist.</ p >
11
+ < Link href = "/" > < h4 > Back to Home</ h4 > </ Link >
12
+ </ div >
13
+ )
14
+ }
15
+
16
+ export default Notfound ;
Original file line number Diff line number Diff line change
1
+ .notfound {
2
+ padding : 0 5% ;
3
+ }
You can’t perform that action at this time.
0 commit comments