forked from owddm/owddm.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.vue
49 lines (45 loc) · 941 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
43
44
45
46
47
48
49
<script setup>
const error = useError();
const props = defineProps({
error: Object,
});
const handleError = () => clearError({ redirect: "/" });
</script>
<template>
<div class="container">
<div>
<SiteHeader />
</div>
<div class="error-container">
<h2>Error: {{ error.statusCode }}</h2>
<h4>{{ error.message }}</h4>
<p v-if="error.statusCode === 404 || '404'">Sorry seems like that page is not available</p>
<br />
<div>
<button @click="handleError">Return to Home</button>
</div>
</div>
<div class="footer">
<SiteFooter />
</div>
</div>
</template>
<style scoped>
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.footer {
margin-top: auto;
padding-bottom: 1rem;
}
.error-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
flex: 1;
padding: 1rem;
}
</style>