Skip to content

Commit

Permalink
fix(g1g1): pass promo data thru profile flow
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreCat committed Dec 4, 2024
1 parent a9923f8 commit a1f44b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/client/src/components/userMenu/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@
import moment from 'moment';
import axios from 'axios';
import each from 'lodash/each';
import find from 'lodash/find';
import cloneDeep from 'lodash/cloneDeep';
import achievementsLib from '@/../../common/script/libs/achievements';
import Content from '@/../../common/script/content';
Expand Down Expand Up @@ -1062,8 +1063,12 @@ export default {
},
computed: {
...mapState({
currentEventList: 'worldState.data.currentEventList',
flatGear: 'content.gear.flat',
}),
currentEvent () {
return find(this.currentEventList, event => Boolean(event.promo));
},
userJoinedDate () {
return moment(this.user.auth.timestamps.created)
.format(this.userLoggedIn.preferences.dateFormat.toUpperCase());
Expand Down Expand Up @@ -1257,6 +1262,7 @@ export default {
},
openSendGemsModal () {
this.user.g1g1 = this.currentEvent?.promo === 'g1g1';
this.$store.state.giftModalOptions.startingPage = 'buyGems';
this.$root.$emit('habitica::send-gift', this.user);
},
Expand Down

0 comments on commit a1f44b8

Please sign in to comment.