| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <template>
- <v-app dark>
- <h1 v-if="error.statusCode !== 404">
- {{ otherError }}
- </h1>
- </v-app>
- </template>
- <script setup lang="ts">
- import UrlUtils from '~/services/utils/urlUtils'
- import { useLayoutStore } from '~/stores/layout'
- const layoutStore = useLayoutStore()
- layoutStore.name = 'error'
- const props = defineProps({
- error: {
- type: Object,
- default: null,
- },
- })
- if (
- import.meta.client &&
- props.error.statusCode === 404 &&
- process.env.NODE_ENV === 'production'
- ) {
- const runtimeConfig = useRuntimeConfig()
- navigateTo(UrlUtils.join(runtimeConfig.baseUrlAdminLegacy, 'dashboard'), {
- external: true,
- })
- }
- const otherError = ref('Une erreur est parvenue')
- </script>
- <style scoped>
- h1 {
- font-size: 20px;
- }
- </style>
|