-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.vue
76 lines (68 loc) · 1.48 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<script setup lang="ts">
import { productionDomains } from './config/productionDomains';
defineProps({
error: { type: Object, required: true },
});
useHead({
title: 'Der skete desværre en fejl',
meta: [
{
name: 'description',
content: 'Vi kunne desværre ikke finde den side, du ledte efter.',
},
{
name: 'robots',
content: 'noindex, nofollow',
},
],
});
const showErrorMessageOnDev = computed(() => {
if (typeof window !== 'undefined') {
return (
window.location.hostname === 'localhost' ||
!productionDomains.includes(window.location.hostname)
);
}
return false;
});
</script>
<template>
<div id="app">
<TheHeaderParent />
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-12 col-sm-12">
<div class="error">
<h1>Siden blev ikke fundet</h1>
<p>Vi beklager, vi kunne ikke finde den side, du anmodede om.</p>
<ClientOnly>
<pre class="error__message" v-if="showErrorMessageOnDev">
{{ error }}
</pre>
</ClientOnly>
</div>
</div>
</div>
</div>
<TheFooterParent />
</div>
</template>
<style lang="postcss">
#app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.container {
display: flex;
flex: 1;
flex-direction: column;
}
.error {
color: var(--theme-color);
padding-top: 40px;
&__message {
padding-top: 20px;
}
}
</style>