diff options
| author | Adam Soltys <[email protected]> | 2022-08-16 16:26:05 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-16 16:26:05 -0700 |
| commit | 7b9bc9be24a565d513c8904237563479265aee9f (patch) | |
| tree | 4749a3d4dd845e13f23c38924752007a281775c0 /src/routes/+error.svelte | |
| parent | 4228d55f0be8497b2f8360460d68e99f14cc7d07 (diff) | |
| download | coinos-ui-7b9bc9be24a565d513c8904237563479265aee9f.tar.gz coinos-ui-7b9bc9be24a565d513c8904237563479265aee9f.zip | |
endpoint migrations
Diffstat (limited to 'src/routes/+error.svelte')
| -rw-r--r-- | src/routes/+error.svelte | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte index 78e7b5a6..e555a032 100644 --- a/src/routes/+error.svelte +++ b/src/routes/+error.svelte @@ -1,27 +1,9 @@ -<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 { page } from '$app/stores'; import { Icon, PageNotFound } from '$comp'; - export let status, error; </script> -{#if status === 404} +{#if $page.error.message.includes('not found') || $page.status === 404} <PageNotFound /> {:else} <div class="flex justify-center items-center mt-20"> @@ -33,7 +15,7 @@ <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 class="px-1 w-full md:w-96 break-all font-bold">{$page.error.message.toUpperCase()}</p> <p>Please try again or contact support.</p> </div> </div> |
