Files
homebox/frontend/error.vue
Tonya 0cd1b46ecb feat: use nuxts built in error page instead of a catch all page (#675)
* feat: use nuxts built in error page instead of a catch all page

* fix: require error prop in error.vue and remove optional chaining for more reliable error handling
2025-05-08 08:16:51 +00:00

24 lines
657 B
Vue

<script setup lang="ts">
import type { NuxtError } from "#app";
import { buttonVariants } from "@/components/ui/button";
const props = defineProps({
error: {
type: Object as () => NuxtError,
required: true,
},
});
console.log(props.error);
</script>
<template>
<main class="grid min-h-screen w-full place-items-center">
<h1 class="flex flex-col gap-5 text-center font-extrabold">
<span class="text-7xl">{{ error.statusCode }}.</span>
<span class="text-5xl"> {{ error.message }} </span>
<NuxtLink to="/" :class="buttonVariants({ size: 'lg' })"> Return Home </NuxtLink>
</h1>
</main>
</template>