-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.vue
40 lines (36 loc) · 929 Bytes
/
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
<script setup lang="ts">
import type { NuxtError } from '#app'
const props = defineProps({
error: Object as () => NuxtError,
})
if (props.error) {
const json = props.error.toJSON ? props.error.toJSON() : JSON.stringify(props.error)
console.error(json)
}
</script>
<template>
<v-app>
<v-container>
<span>
<v-img src="/emoji/orishy.png" alt="oriShy" :width="112" :height="112" />
</span>
<template v-if="error">
<h1>
{{ `${error.statusCode}${error.statusMessage ? ': ' + error.statusMessage : ''}` }}
</h1>
</template>
<h1 v-else>Something went oribly wrong!</h1>
<v-btn to="/">Go back home</v-btn>
</v-container>
</v-app>
</template>
<style scoped>
.v-container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
</style>