-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patherror.vue
More file actions
36 lines (34 loc) · 820 Bytes
/
error.vue
File metadata and controls
36 lines (34 loc) · 820 Bytes
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
<script setup lang="ts">
defineProps({
error: Object,
})
useColorTheme()
const { locale: currentLocale, defaultLocale } = useI18n({ useScope: 'global' })
const homeLink = computed(() => {
if (currentLocale.value === defaultLocale) {
return '/'
}
return `/${currentLocale.value}`
})
</script>
<template>
<main class="typography">
<div class="container-padding container my-16">
<div class="m-default-lg text-center text-3xl md:text-4xl xl:text-5xl">
<h1 v-if="error.statusCode === 404">
404 - {{ $t('errors.page_not_found') }}
</h1>
<h1 v-else>
{{ $t('errors.general_error') }}
</h1>
</div>
<div class="m-default-lg text-center">
<p>
<a :href="homeLink" class="link">
{{ $t('general.back_to_home') }}
</a>
</p>
</div>
</div>
</main>
</template>