Extract 404 page

This commit is contained in:
He4eT 2021-03-03 01:54:56 +05:00
commit ae31af0106
2 changed files with 23 additions and 10 deletions

View file

@ -11,6 +11,7 @@ import {
import HomeView from '~/src/views/HomeView'
import PlayerView from '~/src/views/PlayerView'
import NotFoundView from '~/src/views/NotFoundView'
import '@fontsource/open-sans'
import '~/src/style/base.css'
@ -42,16 +43,7 @@ function App () {
top100
</Route>
<Route>
<div>
<h1>404</h1>
<a href='/'>
Home
</a>
|
<a href='https://github.com/He4eT/ifplayer/issues'>
Report bug
</a>
</div>
<NotFoundView />
</Route>
</Switch>

View file

@ -0,0 +1,21 @@
import { h } from 'preact'
import { Link } from 'wouter-preact'
export default () => (
<main>
<div class='status'>
<h1>404</h1>
<p>Page not found</p>
<hr />
<Link href='/'>
Home
</Link>
|
<a
target='_blank'
href='https://github.com/He4eT/ifplayer/issues'>
Report bug
</a>
</div>
</main>
)