diff --git a/website/common/script/content/constants/events.js b/website/common/script/content/constants/events.js index eac768f45c..cab137e428 100644 --- a/website/common/script/content/constants/events.js +++ b/website/common/script/content/constants/events.js @@ -10,11 +10,17 @@ const gemsPromo = { export const EVENTS = { noCurrentEvent2021: { - start: '2021-04-30T20:00-05:00', + start: '2021-05-31T20:00-05:00', end: '2021-08-23T08:00-05:00', season: 'normal', npcImageSuffix: '', }, + potions202105: { + start: '2021-05-11T08:00-05:00', + end: '2021-05-31T20:00-05:00', + season: 'normal', + npcImageSuffix: '', + }, spring2021: { start: '2021-03-23T08:00-05:00', end: '2021-04-30T20:00-05:00', diff --git a/website/common/script/content/hatching-potions.js b/website/common/script/content/hatching-potions.js index 52957737c5..3adf96eb81 100644 --- a/website/common/script/content/hatching-potions.js +++ b/website/common/script/content/hatching-potions.js @@ -86,18 +86,27 @@ const premium = { value: 2, text: t('hatchingPotionFairy'), limited: true, + event: EVENTS.potions202105, _addlNotes: t('eventAvailabilityReturning', { availableDate: t('dateEndMay'), - previousDate: t('mayYYYY', { year: 2017 }), + previousDate: t('mayYYYY', { year: 2020 }), }), canBuy () { - return moment().isBefore('2020-06-02'); + return moment().isBefore(EVENTS.potions202105.end); }, }, Floral: { value: 2, text: t('hatchingPotionFloral'), limited: true, + event: EVENTS.potions202105, + _addlNotes: t('eventAvailabilityReturning', { + availableDate: t('dateEndMay'), + previousDate: t('mayYYYY', { year: 2016 }), + }), + canBuy () { + return moment().isBefore(EVENTS.potions202105.end); + }, }, Aquatic: { value: 2, diff --git a/website/common/script/libs/shops-seasonal.config.js b/website/common/script/libs/shops-seasonal.config.js index 72bd5db381..b6d92a78ec 100644 --- a/website/common/script/libs/shops-seasonal.config.js +++ b/website/common/script/libs/shops-seasonal.config.js @@ -7,7 +7,7 @@ import { } from '../content/constants'; const CURRENT_EVENT = find( - EVENTS, event => moment().isBetween(event.start, event.end) && Boolean(event.season), + EVENTS, event => moment().isBetween(event.start, event.end), ); const SHOP_OPEN = CURRENT_EVENT && ['winter', 'spring', 'summer', 'fall'].includes(CURRENT_EVENT.season); @@ -18,8 +18,8 @@ export default { currentSeason: SHOP_OPEN ? upperFirst(CURRENT_EVENT.season) : 'Closed', dateRange: { - start: SHOP_OPEN ? moment(CURRENT_EVENT.start) : moment().subtract(1, 'days').toDate(), - end: SHOP_OPEN ? moment(CURRENT_EVENT.end) : moment().subtract(1, 'seconds').toDate(), + start: CURRENT_EVENT ? moment(CURRENT_EVENT.start) : moment().subtract(1, 'days').toDate(), + end: CURRENT_EVENT ? moment(CURRENT_EVENT.end) : moment().subtract(1, 'seconds').toDate(), }, availableSets: SHOP_OPEN