-
Notifications
You must be signed in to change notification settings - Fork 285
/
error.vue
39 lines (38 loc) · 813 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
<template>
<NuxtLayout>
<div class="flex flex-col">
<div v-if="error.statusCode === '404'" class="prose">
<h1>404</h1>
<p>I guess that page doesn't exist.</p>
</div>
<div v-else class="prose">
<h1>Dang</h1>
<p>It looks like something broke.</p>
<p>Sorry about that.</p>
</div>
<div class="prose mt-5">
<p>
<strong>{{ error.message }}</strong>
</p>
<p>
Go to the
<a
class="hover:cursor-pointer"
@click="handleError"
>
login
</a>
</p>
</div>
</div>
</NuxtLayout>
</template>
<script setup>
const error = useError();
const handleError = () => {
clearError({
redirect:
'/login',
});
};
</script>