Add 'no-results' image to make the error page less 'abrupt' for a simple no-results.
This commit is contained in:
@@ -2,12 +2,16 @@
|
|||||||
import { page } from '$app/state';
|
import { page } from '$app/state';
|
||||||
|
|
||||||
import stopErr from '$lib/assets/img/stop-error.svg';
|
import stopErr from '$lib/assets/img/stop-error.svg';
|
||||||
|
import noResult from '$lib/assets/img/no-data.svg';
|
||||||
import Button from '$lib/components/ui/Button.svelte';
|
import Button from '$lib/components/ui/Button.svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="error-wrapper">
|
<div class="error-wrapper">
|
||||||
|
{#if page.status == 20}
|
||||||
|
<img class="err-img" src={noResult} alt="" role="presentation" width="200" height="200" />
|
||||||
|
{:else}
|
||||||
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
|
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
|
||||||
|
{/if}
|
||||||
<h2 class="label">{page.status}</h2>
|
<h2 class="label">{page.status}</h2>
|
||||||
|
|
||||||
<p class="error-message">
|
<p class="error-message">
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export const load: PageLoad = async ({ url }) => {
|
|||||||
owlCode: 'API_ERROR',
|
owlCode: 'API_ERROR',
|
||||||
});
|
});
|
||||||
} else if (e instanceof Error) {
|
} else if (e instanceof Error) {
|
||||||
throw error(20, {
|
throw error(500, {
|
||||||
message: e.message,
|
message: e.message,
|
||||||
owlCode: 'GEN_ERROR',
|
owlCode: 'GEN_ERROR',
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user