-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherror.vue
43 lines (41 loc) · 1.13 KB
/
error.vue
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
43
<template>
<NuxtLayout name="default">
<div
class="mx-8 mt-[30vh] flex flex-col items-center justify-center text-center"
>
<h1 class="mb-4 text-2xl font-bold text-tiaPink">
{{
error.statusCode === 404
? $t('error.notFound.title')
: error.statusCode === 401
? $t('error.unauthorized.title')
: $t('error.default.title')
}}
</h1>
<p class="mb-6">
{{
error.statusCode === 404
? $t('error.notFound.description')
: error.statusCode === 401
? $t('error.unauthorized.description')
: $t('error.default.description')
}}
</p>
<button
class="rounded bg-tiaBlue px-4 py-2 text-white hover:bg-tiaBlue-dark"
@click="$router.push('/')"
>
{{ $t('error.backToHome') }}
</button>
</div>
</NuxtLayout>
</template>
<script setup lang="ts">
import type { NuxtError } from '#app';
const _props = defineProps({
error: {
type: Object as () => NuxtError,
default: () => ({ statusCode: 500 }),
},
});
</script>