Move reports module to store

This commit is contained in:
Sean King 2023-04-06 17:59:12 -06:00
commit ad7d47f440
No known key found for this signature in database
GPG key ID: 510C52BACD6E7257
8 changed files with 64 additions and 74 deletions

View file

@ -3,6 +3,7 @@ import List from '../list/list.vue'
import Checkbox from '../checkbox/checkbox.vue'
import Modal from '../modal/modal.vue'
import UserLink from '../user_link/user_link.vue'
import { useReportsStore } from '../../stores/reports'
const UserReportingModal = {
components: {
@ -23,7 +24,7 @@ const UserReportingModal = {
},
computed: {
reportModal () {
return this.$store.state.reports.reportModal
return useReportsStore().reportModal
},
isLoggedIn () {
return !!this.$store.state.users.currentUser
@ -63,7 +64,7 @@ const UserReportingModal = {
this.error = false
},
closeModal () {
this.$store.dispatch('closeUserReportingModal')
useReportsStore().closeUserReportingModal()
},
reportUser () {
this.processing = true