Files
baserow/web-frontend/error.vue
56943a3601 feat: add compact menu variant to Menu element (#4059)
---------

Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
2026-06-03 17:32:23 +00:00

35 lines
654 B
Vue

<template>
<component :is="errorPageType.getComponent()" :error="error" />
</template>
<script>
import { computed } from 'vue'
export default {
props: {
error: {
type: Object,
required: true,
},
},
setup(props) {
const { $i18n } = useNuxtApp()
const message = computed(
() => props.error?.message || $i18n.t('common.wrong')
)
useHead(() => ({
title: message.value,
}))
},
computed: {
errorPageType() {
return this.$registry
.getOrderedList('errorPage')
.reverse()
.find((errorPageType) => errorPageType.isApplicable(this.error))
},
},
}
</script>