feat(promo): G1G1 2021

Also refactors a number of places on web client to start using event 
list from world state instead of singular currentEvent
This commit is contained in:
SabreCat
2021-12-15 16:20:43 -06:00
parent a1cddcaf17
commit 391a9bd91b
9 changed files with 50 additions and 12 deletions
@@ -210,6 +210,7 @@
<script>
import debounce from 'lodash/debounce';
import find from 'lodash/find';
import isUUID from 'validator/lib/isUUID';
import { mapState } from '@/libs/store';
import closeIcon from '@/assets/svg/close.svg';
@@ -227,8 +228,11 @@ export default {
},
computed: {
...mapState({
currentEvent: 'worldState.data.currentEvent',
currentEventList: 'worldState.data.currentEventList',
}),
currentEvent () {
return find(this.currentEventList, event => Boolean(event.gemsPromo) || Boolean(event.promo));
},
searchCannotSubmit () {
if (this.userSearchTerm.length < 1) return true;
return typeof this.foundUser._id === 'undefined';