feat: create custom error page, wip

This commit is contained in:
SauceyRed 2025-05-28 02:29:44 +02:00
parent 1783928c36
commit 582435a3c7
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7

29
error.vue Normal file
View file

@ -0,0 +1,29 @@
<template>
<div id="error-container">
<h2>{{ error?.statusCode }}</h2>
<p>{{ error?.message }}</p>
</div>
</template>
<script lang="ts" setup>
import type { NuxtError } from '#app';
const props = defineProps({
error: Object as () => NuxtError
});
if (props.error?.statusCode == 401) {
console.log("HELLO THERE");
clearError({ redirect: `/login?redirect_to=${useRoute().fullPath}` });
}
</script>
<style scoped>
#error-container {
text-align: center;
margin: auto;
}
</style>