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 t from '../../../translation';
const CURRENT_EVENT = find(EVENTS, event => {
moment().isBetween(event.start, event.end);
});
const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end));
const gearEvents = cloneDeep(EVENTS);
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => {

View File

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

View File

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