fix(event): more find syntax, fix featured items, no spoilers

This commit is contained in:
Sabe Jones
2020-12-17 09:36:49 -06:00
parent dc34db98b4
commit 8a64def893
3 changed files with 8 additions and 7 deletions

View File

@@ -14,9 +14,7 @@ import * as takeThisGear from './special-takeThis';
import * as wonderconGear from './special-wondercon'; import * as wonderconGear from './special-wondercon';
import t from '../../../translation'; import t from '../../../translation';
const CURRENT_EVENT = find(EVENTS, event => { const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end));
moment().isBetween(event.start, event.end);
});
const gearEvents = cloneDeep(EVENTS); const gearEvents = cloneDeep(EVENTS);
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => { ['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => {

View File

@@ -410,7 +410,10 @@ const premium = {
canBuy: hasQuestAchievementFunction('blackPearl'), canBuy: hasQuestAchievementFunction('blackPearl'),
_addlNotes: t('premiumPotionUnlimitedNotes'), _addlNotes: t('premiumPotionUnlimitedNotes'),
}, },
StainedGlass: { };
if (moment().isAfter('2020-12-22T08:00-04:00')) {
premium.StainedGlass = {
value: 2, value: 2,
text: t('hatchingPotionStainedGlass'), text: t('hatchingPotionStainedGlass'),
limited: true, limited: true,
@@ -421,8 +424,8 @@ const premium = {
canBuy () { canBuy () {
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00'); return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
}, },
},
}; };
}
const wacky = { const wacky = {
Veggie: { Veggie: {

View File

@@ -4,7 +4,7 @@ import moment from 'moment';
// path: 'premiumHatchingPotions.Rainbow', // path: 'premiumHatchingPotions.Rainbow',
const featuredItems = { const featuredItems = {
market () { market () {
if (moment().isBefore('2020-12-17T08:00-04:00')) { if (moment().isBefore('2020-12-22T08:00-04:00')) {
return [ return [
{ {
type: 'armoire', type: 'armoire',