From cb8db68b5bac1005c937eb5fb1db815d0b3cfad9 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 10 Jul 2023 17:10:55 +0200 Subject: [PATCH] user mapgetters instead of addressing the store directly --- webapp/components/Chat/Chat.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index cca030387..2b9514bf3 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -3,7 +3,7 @@ import { roomQuery, createRoom } from '~/graphql/Rooms' import { messageQuery, createMessageMutation } from '~/graphql/Messages' +import { mapGetters } from 'vuex' export default { name: 'Chat', @@ -43,7 +44,6 @@ export default { }, data() { return { - currentUserId: this.$store.getters['auth/user'].id, menuActions: [ /* { name: 'inviteUser', @@ -131,6 +131,11 @@ export default { }) } }, + computed: { + ...mapGetters({ + currentUser: 'auth/user', + }), + }, methods: { fetchMessages({ room, options = {} }) { this.messagesLoaded = false