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