From 6e723aadf6de45a79b4ef64d288ea275628232c5 Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Thu, 15 Dec 2022 14:59:56 -0600
Subject: start updating to sveltekit v1

---
 src/routes/+error.svelte | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 src/routes/+error.svelte

(limited to 'src/routes/+error.svelte')

diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte
new file mode 100644
index 0000000..83b4407
--- /dev/null
+++ b/src/routes/+error.svelte
@@ -0,0 +1,43 @@
+<script lang="ts">
+	import Header from '$lib/Header.svelte'
+	import Head from '$lib/Head.svelte'
+
+	import { page } from '$app/stores'
+
+	// sveltekit bug: types of error and status say they can be null but they can't
+	let error = $page.error!
+	let status = $page.status!
+</script>
+
+<Head title={error.message} />
+<Header />
+
+<main>
+	<div>
+		<h1>{status}</h1>
+		<p>{error.message}</p>
+		<a href="/" data-sveltekit-preload-data="hover">Home</a>
+	</div>
+</main>
+
+<style>
+	main {
+		height: calc(100% - 4rem);
+		/* vertical align */
+		display: grid;
+		align-items: center;
+		justify-content: center;
+	}
+
+	h1 {
+		font-size: 3em;
+		margin: 0;
+	}
+	p {
+		margin: 0;
+	}
+	a {
+		display: block;
+		margin-top: 0.5rem;
+	}
+</style>
-- 
cgit 

