-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.vue
More file actions
41 lines (37 loc) · 944 Bytes
/
Copy patherror.vue
File metadata and controls
41 lines (37 loc) · 944 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
37
38
39
40
41
<script setup lang="ts">
import type { NuxtError } from '#app'
const props = defineProps({
error: {
type: Object as () => NuxtError<Record<string, unknown>>,
default: () => ({}),
},
})
const router = useRouter()
const errorText = computed(() => {
return props.error?.message || 'Something went wrong'
})
</script>
<template>
<NuxtLayout>
<div class="flex justify-center min-h-[100dvh] py-16">
<div class="container flex flex-col justify-between">
<div
class="flex flex-col justify-center items-center h-full flex-1"
>
<div class="text-p2 text-center px-16">
Error:
{{ errorText }}
</div>
</div>
<UiButton
variant="primary-stroke"
size="large"
rounded
@click="router.replace('/')"
>
Go to Main Page
</UiButton>
</div>
</div>
</NuxtLayout>
</template>