aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/__error.svelte
diff options
context:
space:
mode:
authorAdrien Hopkins <[email protected]>2022-08-02 13:13:27 -0500
committerAdrien Hopkins <[email protected]>2022-08-02 13:13:27 -0500
commitc21ee41b206db79b2157d8743b0473a094448dfb (patch)
treefac1a595e451c0b32ceedfe4fb70855270456377 /src/routes/__error.svelte
parent3b216dd6c170a7d71d21a391098c554008c8bdb4 (diff)
parent05f5001fc7d325e31d9c777be11343604c72fbfd (diff)
downloadcoinos-ui-c21ee41b206db79b2157d8743b0473a094448dfb.tar.gz
coinos-ui-c21ee41b206db79b2157d8743b0473a094448dfb.zip
Merge branch 'master' into i18n
Diffstat (limited to 'src/routes/__error.svelte')
-rw-r--r--src/routes/__error.svelte38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/routes/__error.svelte b/src/routes/__error.svelte
new file mode 100644
index 00000000..2d617f9d
--- /dev/null
+++ b/src/routes/__error.svelte
@@ -0,0 +1,38 @@
+<script context="module">
+ export function load({ error, status }) {
+ if (error.message.includes('not found')) {
+ error.message = 'Page not found';
+ status = 404;
+ }
+
+ return {
+ props: {
+ error,
+ status
+ }
+ };
+ }
+</script>
+
+<script>
+ import { Icon, PageNotFound } from '$comp';
+ export let status, error;
+</script>
+
+{#if status === 404}
+ <PageNotFound />
+{:else}
+ <div class="flex justify-center items-center mt-20">
+ <div class="space-y-5 text-center">
+ <a href="/">
+ <Icon icon="logo" />
+ </a>
+
+ <Icon icon="error" style="mx-auto w-full" />
+
+ <h1 class="font-bold text-5xl">Error</h1>
+ <p>{error.message}</p>
+ <p>Please try again or contact support.</p>
+ </div>
+ </div>
+{/if}