-
Notifications
You must be signed in to change notification settings - Fork 25
/
error.vue
37 lines (31 loc) · 973 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
<script setup lang="ts">
import type { NuxtError } from '#app'
const props = defineProps<{
error: NuxtError
}>()
if (props.error.statusCode === 404)
useTrackEvent('404', { props: { path: document.location.pathname } })
useSeoMeta({
title: 'Page not found',
description: 'We are sorry but this page could not be found.',
})
</script>
<template>
<Body class="font-sans dark:bg-gray-900">
<Header />
<div class="px-4 container mx-auto xl:max-w-7xl">
<Main class="flex flex-col items-center justify-center">
<h1 class="text-4xl font-bold">
{{ error.statusCode }}
</h1>
<p class="mt-4 text-lg text-gray-500 dark:text-gray-400">
{{ error.message }}
</p>
<UButton class="mt-12" to="/" color="primary" variant="solid" size="sm" :ui="{ variant: { solid: 'shadow-none text-gray-950' } }">
Go back home
</UButton>
</Main>
</div>
<Footer />
</Body>
</template>