-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherror.vue
59 lines (48 loc) · 1.11 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<script setup lang="ts">
import type { NuxtError } from '#app'
interface Props {
error: NuxtError | null
}
defineProps<Props>()
const handleError = () => clearError({ redirect: '/' })
</script>
<template>
<NuxtLayout>
<div class="error-page">
<div class="error-page__wrapper">
<h4 class="error-page__title">{{ error?.statusCode }}</h4>
<p class="error-page__subtitle">
{{
error?.statusCode === 404 ? $t('error.subtitle') : error?.message
}}
</p>
<SiteButton
intent="primary"
class="error-page__button"
@click="handleError"
>
{{ $t('error.button') }}
</SiteButton>
</div>
</div>
</NuxtLayout>
</template>
<style lang="scss" scoped>
.error-page {
// .error-page__wrapper
&__wrapper {
@apply mb-32 mt-20 flex flex-col items-center justify-center;
}
// .error-page__title
&__title {
@apply mb-2 text-[10rem] leading-snug text-dark-300;
}
// .error-page__subtitle
&__subtitle {
@apply mb-4 text-base;
}
// .error-page__button
&__button {
}
}
</style>