Skip to content

Commit

Permalink
feat(site): add error page
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Sep 27, 2023
1 parent efa9c07 commit 358615d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions site/src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

<script>
import { page } from '$app/stores';
</script>

<main class="flex items-center justify-center flex-1 flex-col">
<h1 class="text-3xl font-bold">Error Loading Page</h1>
<p class="italic text-xl">Sorry about that.</p>
<a class="font-mono text-accent text-xl" href="/">Back to home -&gt;</a>

{#if $page?.error}
<div class="mt-16">
<h2 class="font-bold">Details:</h2>
{#if $page?.status}
<p>Page status: {$page?.status}</p>
{/if}
{#if $page?.error?.message}
<p>Error message: {$page?.error?.message}</p>
{/if}
</div>
{/if}
</main>

0 comments on commit 358615d

Please sign in to comment.