import { get , post } from "../api" ; import { Module } from "vuex" ; import { RootState , StaffState } from "./types" ; export const StaffStore = { namespaced : true , state : { isStaff : false , } , actions : { async checkStatus ( { commit } ) { const status = await get ( "staff/status" ) ; commit ( "setStatus" , status . isStaff ) ; } , } , mutations : { setStatus ( state , value ) { state . isStaff = value ; } , } , } ;