-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherror.vue
42 lines (40 loc) · 1.22 KB
/
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
<script setup lang="ts">
const error = useError();
const handleError = () => clearError({ redirect: '/' });
</script>
<template>
<NuxtLayout>
<Card>
<CardTitle>Ooopss...</CardTitle>
<CardDetails>
<div v-if="error.statusCode == 404">
<div>
We couldn't find the page you're looking for. Maybe it wasn't
<i>the one</i>
?
</div>
<div>
No worries, you can always take a step back and begin
<span
@click="handleError"
class="cursor-pointer text-link no-underline hover:text-linkHover hover:underline">
where you started
</span>
.
</div>
</div>
<div v-else-if="error.statusCode == 500">
Love may be complicated, and this error is too. It's not you, it's us.
Please let us know how you ended up here! In the meantime, you can
explore our wonderful
<span
@click="handleError"
class="cursor-pointer text-link no-underline hover:text-linkHover hover:underline">
Home page
</span>
.
</div>
</CardDetails>
</Card>
</NuxtLayout>
</template>