-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.vue
29 lines (28 loc) · 933 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
<script setup lang="ts">
const error = useError();
</script>
<template>
<div class="grid h-screen grid-cols-1 place-items-center">
<div class="flex flex-col gap-4 text-center">
<h1 class="text-6xl font-bold text-red-600">Error occurred!</h1>
<h1 class="text-3xl font-bold text-red-400">
{{
error?.statusCode.toString().startsWith("4")
? "...and it's your fault?"
: error?.statusCode.toString().startsWith("5")
? "We messed up"
: "How did you get here?"
}}
</h1>
<div class="flex flex-col gap-0">
<p class="text-base text-neutral-400">
Error with status {{ error?.statusCode }}
</p>
<p class="text-base text-neutral-400">
{{ error?.message }}
</p>
</div>
<button class="btn btn-primary" @click="navigateTo('/')">Go home</button>
</div>
</div>
</template>