-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.vue
42 lines (37 loc) · 963 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
41
42
<template>
<main class="error-page-container">
<div class="error-page-box px-3">
<div class="error-page-content">
<h1 class="text-8xl text-white font-bold font-mono">
{{ error.statusCode }}
</h1>
<div class="text-4xl text-white font-bold font-mono">
{{ error.message || error.statusMessage || "" }}
</div>
<hr class="my-5" />
<button
class="text-white text-2xl font-bold font-mono uppercase"
@click="handleError"
aria-label="Go Home"
>
<Icon class="mb-1" name="mdi:home" />
Go Home
</button>
</div>
</div>
</main>
</template>
<script setup lang="ts">
const props = defineProps({
error: Object,
});
const { error } = toRefs(props);
const router = useRouter();
const handleError = () => {
clearError();
router.push("/");
};
useSeoMeta({
title: `Error ${unref(error).statusCode}`,
});
</script>