Files
habitica/website/client/src/mixins/worldState.js
T
negue 7044c497a2 FIX: notifications position with 2nd banner - WIP (#13556)
* FIX: notifications position with 2nd banner

* emit event when worldState is loaded

* fix heights / padding of notifications
2021-10-21 15:17:09 -05:00

16 lines
454 B
JavaScript

import { EVENTS } from '@/libs/events';
export const worldStateMixin = { // eslint-disable-line import/prefer-default-export
methods: {
async triggerGetWorldState (forceLoad = false) {
if (forceLoad) {
await this.$store.dispatch('worldState:getWorldState', { forceLoad: true });
} else {
await this.$store.dispatch('worldState:getWorldState');
}
this.$root.$emit(EVENTS.WORLD_STATE_LOADED);
},
},
};