car_trader/error.vue

22 lines
574 B
Vue

<script setup>
const error = useError();
const handleError = () => {
clearError({
redirect: "/",
});
// navigateTo("/");
}
</script>
<template>
<div class="flex h-screen justify-center items-center flex-col" v-if="error">
<h1 class="text-9xl">Error {{error.statusCode}}</h1>
<p class="mt-7 text-4xl">{{error.message}}</p>
<button
class="rounded mt-7 text-2xl bg-blue-400 py-4 text-white"
@click="handleError"
>Go Back
</button>
</div>
</template>