feat: proper 404 page

This commit is contained in:
Draconizations 2022-04-25 20:44:40 +02:00
parent f712e035e1
commit 07d8f79445
2 changed files with 21 additions and 0 deletions

View File

@ -10,6 +10,7 @@
import Status from './pages/status.svelte'; import Status from './pages/status.svelte';
import Member from './pages/Member.svelte'; import Member from './pages/Member.svelte';
import Group from './pages/Group.svelte'; import Group from './pages/Group.svelte';
import PageNotFound from './pages/PageNotFound.svelte';
import { Alert } from 'sveltestrap'; import { Alert } from 'sveltestrap';
import DiscordLogin from "./pages/DiscordLogin.svelte"; import DiscordLogin from "./pages/DiscordLogin.svelte";
import { onMount } from 'svelte'; import { onMount } from 'svelte';
@ -81,5 +82,6 @@ import DiscordLogin from "./pages/DiscordLogin.svelte";
<Alert color="danger">Please provide a group ID in the URL.</Alert> <Alert color="danger">Please provide a group ID in the URL.</Alert>
</Route> </Route>
<Route path="status"><Status /></Route> <Route path="status"><Status /></Route>
<Route component={PageNotFound}/>
<Footer /> <Footer />
</Router> </Router>

View File

@ -0,0 +1,19 @@
<script lang="ts">
import { Container, Card, CardHeader, CardBody, Row, Col, CardTitle } from 'sveltestrap';
import { Link } from 'svelte-navigator';
</script>
<Container>
<Row>
<Col class="mx-auto" xs={12} lg={11} xl={10}>
<Card>
<CardHeader>
<CardTitle style="margin-top: 8px; outline: none;">404. Page not found</CardTitle>
</CardHeader>
<CardBody>
Looks like this page doesn't exist. <Link to="/">Go home</Link>?
</CardBody>
</Card>
</Col>
</Row>
</Container>