mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-04 17:07:22 +00:00
Extract 404 page
This commit is contained in:
parent
0f8d413708
commit
ae31af0106
2 changed files with 23 additions and 10 deletions
12
src/index.js
12
src/index.js
|
|
@ -11,6 +11,7 @@ import {
|
||||||
|
|
||||||
import HomeView from '~/src/views/HomeView'
|
import HomeView from '~/src/views/HomeView'
|
||||||
import PlayerView from '~/src/views/PlayerView'
|
import PlayerView from '~/src/views/PlayerView'
|
||||||
|
import NotFoundView from '~/src/views/NotFoundView'
|
||||||
|
|
||||||
import '@fontsource/open-sans'
|
import '@fontsource/open-sans'
|
||||||
import '~/src/style/base.css'
|
import '~/src/style/base.css'
|
||||||
|
|
@ -42,16 +43,7 @@ function App () {
|
||||||
top100
|
top100
|
||||||
</Route>
|
</Route>
|
||||||
<Route>
|
<Route>
|
||||||
<div>
|
<NotFoundView />
|
||||||
<h1>404</h1>
|
|
||||||
<a href='/'>
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
|
|
|
||||||
<a href='https://github.com/He4eT/ifplayer/issues'>
|
|
||||||
Report bug
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</Route>
|
</Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
||||||
|
|
|
||||||
21
src/views/NotFoundView.jsx
Normal file
21
src/views/NotFoundView.jsx
Normal 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>
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue