generated from divasilevski/nuxt-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.vue
43 lines (37 loc) · 862 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
<template>
<NuxtLink to="/" class="error">
MrBeam
<AppIcon name="logo" class="logo-icon" />
<div class="message">Error {{ statusCode }}</div>
<div class="description">
<div v-if="statusCode === 404">Page not found or no longer exist</div>
<div v-else>Something went wrong</div>
</div>
</NuxtLink>
</template>
<script lang="ts" setup>
const props = defineProps({
error: {
type: Object,
default: undefined,
},
})
const statusCode = computed(() => {
return props.error?.statusCode
})
</script>
<style lang="postcss">
.error {
@apply flex items-center justify-center flex-col gap-2 h-screen
text-secondary font-sans font-bold text-3xl;
.logo-icon {
@apply text-primary my-4;
}
.message {
@apply text-2xl;
}
.description {
@apply text-base px-4 text-center max-w-sm;
}
}
</style>