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