Change store commits into 'mapMutations' on user profile

This commit is contained in:
Wolfgang Huß 2023-07-13 09:30:19 +02:00
parent 40774b0498
commit 34bb207e8e

View File

@ -85,7 +85,7 @@
content: $t('chat.userProfileButton.tooltip', { name: userName }),
placement: 'bottom-start',
}"
@click="$store.commit('chat/SET_OPEN_CHAT', { showChat: true, roomID: user.id })"
@click="showChat({ showChat: true, roomID: user.id })"
>
{{ $t('chat.userProfileButton.label') }}
</base-button>
@ -182,6 +182,7 @@
<script>
import uniqBy from 'lodash/uniqBy'
import { mapMutations } from 'vuex'
import postListActions from '~/mixins/postListActions'
import PostTeaser from '~/components/PostTeaser/PostTeaser.vue'
import HcFollowButton from '~/components/Button/FollowButton'
@ -291,6 +292,10 @@ export default {
},
},
methods: {
...mapMutations({
commitModalData: 'modal/SET_OPEN',
showChat: 'chat/SET_OPEN_CHAT',
}),
handleTab(tab) {
if (this.tabActive !== tab) {
this.tabActive = tab
@ -366,7 +371,7 @@ export default {
}
},
async deleteUser(userdata) {
this.$store.commit('modal/SET_OPEN', {
this.commitModalData({
name: 'delete',
data: {
userdata: userdata,