mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 00:08:25 +00:00
--------- 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>
35 lines
654 B
Vue
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>
|