diff options
| author | Adam Soltys <[email protected]> | 2022-11-02 19:47:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-02 19:48:18 -0700 |
| commit | f0d88333750a2865d3016e92620a87269160effa (patch) | |
| tree | 1cc276efeb5287e1fc176ec60d46aed091ab08ca /src/routes/(app)/+error.svelte | |
| parent | b66477f0912349ef91adaff8c57ac787b5a56447 (diff) | |
| download | coinos-ui-f0d88333750a2865d3016e92620a87269160effa.tar.gz coinos-ui-f0d88333750a2865d3016e92620a87269160effa.zip | |
move to app layout
Diffstat (limited to 'src/routes/(app)/+error.svelte')
| -rw-r--r-- | src/routes/(app)/+error.svelte | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/routes/(app)/+error.svelte b/src/routes/(app)/+error.svelte new file mode 100644 index 00000000..d561b111 --- /dev/null +++ b/src/routes/(app)/+error.svelte @@ -0,0 +1,26 @@ +<script> + import { page } from '$app/stores'; + import { Icon, PageNotFound } from '$comp'; + import { t } from '$lib/translations'; + import { back } from '$lib/utils'; + + export let data; + let { user } = data; +</script> + +{#if $page.error.message.includes('not found') || $page.status === 404} + <PageNotFound /> +{:else} + <div class="container px-4 max-w-md mx-auto mt-20 text-center"> + <h1 class="text-center text-3xl md:text-4xl font-semibold mb-8"> + {$t('error.header')} + </h1> + + <p class="px-1 break-all mb-8">{$page.error.message}</p> + + <button + class="rounded-full bg-black text-white py-2 px-5 font-bold hover:opacity-80 mb-2" + on:click={back}>Back</button + > + </div> +{/if} |
