refactor(potions): de-hardcode premium potion end dates

This commit is contained in:
Sabe Jones
2021-04-13 14:36:24 -05:00
parent d231eb3023
commit b5497b149b

View File

@@ -197,7 +197,7 @@ const premium = {
}),
event: EVENTS.spring2021,
canBuy () {
return moment().isBefore('2021-04-30T20:00-04:00');
return moment().isBefore(EVENTS.spring2021.end);
},
},
Glass: {
@@ -347,13 +347,13 @@ const premium = {
value: 2,
text: t('hatchingPotionBirchBark'),
limited: true,
event: EVENTS.spring2020,
event: EVENTS.spring2021,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2020 }),
}),
canBuy () {
return moment().isBefore('2021-04-30T20:00-04:00');
return moment().isBefore(EVENTS.spring2021.end);
},
},
Fluorite: {
@@ -440,7 +440,7 @@ const premium = {
date: t('dateEndMarch'),
}),
canBuy () {
return moment().isBefore('2021-04-30T20:00-04:00');
return moment().isBefore(EVENTS.spring2021.end);
},
},
};