Use 'mapMutations' in default layout

This commit is contained in:
Wolfgang Huß 2023-07-18 18:20:04 +02:00
parent c7deefa563
commit a3b3e02ebc

View File

@ -20,7 +20,7 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters, mapMutations } from 'vuex'
import seo from '~/mixins/seo' import seo from '~/mixins/seo'
import mobile from '~/mixins/mobile' import mobile from '~/mixins/mobile'
import HeaderMenu from '~/components/HeaderMenu/HeaderMenu' import HeaderMenu from '~/components/HeaderMenu/HeaderMenu'
@ -42,8 +42,11 @@ export default {
}), }),
}, },
methods: { methods: {
...mapMutations({
showChat: 'chat/SET_OPEN_CHAT',
}),
closeSingleRoom() { closeSingleRoom() {
this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null }) this.showChat({ showChat: false, roomID: null })
}, },
}, },
beforeCreate() { beforeCreate() {