mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
refactor(potions): de-hardcode premium potion end dates
This commit is contained in:
@@ -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);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user