diff options
| author | Adam Soltys <[email protected]> | 2022-08-16 15:31:41 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-16 15:31:41 -0700 |
| commit | 770725fbdcc8ea7bf47ef0af5a43a239bef98ff6 (patch) | |
| tree | 445d55b896a63eab5a29204e720a9e74d0629697 /src/routes/+error.svelte | |
| parent | 0b51e1dfd0d099c243d21889fb77fea4769dac0a (diff) | |
| download | coinos-ui-770725fbdcc8ea7bf47ef0af5a43a239bef98ff6.tar.gz coinos-ui-770725fbdcc8ea7bf47ef0af5a43a239bef98ff6.zip | |
sveltekit route migration
Diffstat (limited to 'src/routes/+error.svelte')
| -rw-r--r-- | src/routes/+error.svelte | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte new file mode 100644 index 00000000..78e7b5a6 --- /dev/null +++ b/src/routes/+error.svelte @@ -0,0 +1,40 @@ +<script context="module"> + throw new Error("@migration task: Replace error load function (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3293209)"); + + // 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" style="mx-auto" /> + </a> + + <Icon icon="error" style="mx-auto w-56" /> + + <h1 class="font-bold text-5xl">Error</h1> + <p class="px-1 w-full md:w-96 break-all font-bold">{error.message.toUpperCase()}</p> + <p>Please try again or contact support.</p> + </div> + </div> +{/if} |
