blob: 8d613909f123112a020d8a28794bb1a4594a9765 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<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;
$: message = $page.error.message;
$: if (message.startsWith('Internal')) message = 'Something went wrong';
</script>
{#if $page.error.message.includes('not found') || $page.status === 404}
<PageNotFound />
{:else}
<div class="container px-4 max-w-lg mx-auto mt-20 space-y-5">
<div class="w-[243px] mx-auto mb-10">
<a href="/">
<Icon icon="logo" />
</a>
</div>
<div class="flex justify-center items-center">
<div class="shadow-xl rounded-3xl p-10 pb-12 space-y-5 w-full mx-5 md:mx-0 md:w-[400px]">
<h1 class="text-3xl md:text-4xl font-semibold">
{$t('error.header')}
</h1>
<p class="text-secondary">
{message}. If the problem persists, please
<a href="/support" class="underline">let us know.</a>
</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>
</div>
</div>
{/if}
|