Client - minor refacto + fix

This commit is contained in:
Sam 2021-10-23 16:09:16 +02:00
parent 2de2ad3f3f
commit d072189936
3 changed files with 5 additions and 12 deletions

View File

@ -2,7 +2,7 @@
<Error <Error
title="404" title="404"
:message="$t(`error.NOT_FOUND.${target}`)" :message="$t(`error.NOT_FOUND.${target}`)"
:button-text="t('common.HOME')" :button-text="$t('common.HOME')"
/> />
</template> </template>

View File

@ -6,7 +6,6 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import NotFound from '@/components/Common/NotFound.vue' import NotFound from '@/components/Common/NotFound.vue'
@ -15,9 +14,5 @@
components: { components: {
NotFound, NotFound,
}, },
setup() {
const { t } = useI18n()
return { t }
},
}) })
</script> </script>

View File

@ -6,12 +6,11 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, ComputedRef, defineComponent } from 'vue' import { computed, defineComponent } from 'vue'
import Profile from '@/components/User/ProfileDisplay/index.vue' import Profile from '@/components/User/ProfileDisplay/index.vue'
import ProfileEdition from '@/components/User/ProfileEdition/index.vue' import ProfileEdition from '@/components/User/ProfileEdition/index.vue'
import { USER_STORE } from '@/store/constants' import { USER_STORE } from '@/store/constants'
import { IAuthUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore' import { useStore } from '@/use/useStore'
export default defineComponent({ export default defineComponent({
@ -32,11 +31,10 @@
}, },
setup() { setup() {
const store = useStore() const store = useStore()
const authUser: ComputedRef<IAuthUserProfile> = computed(
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
return { return {
authUser, authUser: computed(
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
),
} }
}, },
}) })