51 lines
1 KiB
Vue
51 lines
1 KiB
Vue
|
<template>
|
||
|
|
||
|
<div class="app">
|
||
|
<AppError class="app__error" @handle-error="handleError" />
|
||
|
</div>
|
||
|
|
||
|
</template>
|
||
|
|
||
|
<script setup>
|
||
|
|
||
|
// --------------------------------------------------
|
||
|
// DATA
|
||
|
// --------------------------------------------------
|
||
|
|
||
|
const props = defineProps({
|
||
|
error: Object
|
||
|
});
|
||
|
const pageTitleChunk = `Erreur ${props.error.statusCode}`;
|
||
|
|
||
|
// --------------------------------------------------
|
||
|
// HEAD
|
||
|
// --------------------------------------------------
|
||
|
|
||
|
useAppHead(pageTitleChunk);
|
||
|
|
||
|
// --------------------------------------------------
|
||
|
// LOGIC
|
||
|
// --------------------------------------------------
|
||
|
|
||
|
const handleError = () => {
|
||
|
clearError({ redirect: '/' });
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
|
||
|
// --------------------------------------------------
|
||
|
// LAYOUT
|
||
|
// --------------------------------------------------
|
||
|
|
||
|
.app {
|
||
|
|
||
|
&__error {
|
||
|
grid-area: app-main;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
</style>
|