2023-01-06 15:46:20 +01:00
|
|
|
<template>
|
|
|
|
|
|
|
|
<div class="app">
|
2023-01-10 10:28:09 +01:00
|
|
|
<AppError class="app__error" :error-message="errorMessage" @handle-error="handleError" />
|
2023-01-11 15:16:55 +01:00
|
|
|
<AppFooter class="app__footer" />
|
2023-01-06 15:46:20 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
|
|
// --------------------------------------------------
|
|
|
|
// DATA
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
error: Object
|
|
|
|
});
|
2023-01-10 10:28:09 +01:00
|
|
|
const errorMessage = `Erreur ${props.error.statusCode}`;
|
2023-01-06 15:46:20 +01:00
|
|
|
|
|
|
|
// --------------------------------------------------
|
|
|
|
// HEAD
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2023-01-10 10:28:09 +01:00
|
|
|
useAppHead(errorMessage);
|
2023-01-06 15:46:20 +01:00
|
|
|
|
|
|
|
// --------------------------------------------------
|
|
|
|
// LOGIC
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
const handleError = () => {
|
|
|
|
clearError({ redirect: '/' });
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2023-01-11 15:16:55 +01:00
|
|
|
<style lang="scss" scoped>
|
2023-01-06 15:46:20 +01:00
|
|
|
|
|
|
|
// --------------------------------------------------
|
2023-02-02 17:02:53 +01:00
|
|
|
// STYLE
|
2023-01-06 15:46:20 +01:00
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.app {
|
|
|
|
|
|
|
|
&__error {
|
|
|
|
grid-area: app-main;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|