mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
refactor(potions): de-hardcode premium potion end dates
This commit is contained in:
parent
d231eb3023
commit
b5497b149b
1 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue