Fix dark mode bug -- no longer always night

This commit is contained in:
Liam Cardenas 2018-01-29 15:19:46 -08:00
parent 47e4f0029a
commit bc818f5383

View file

@ -68,11 +68,11 @@ export function doUpdateIsNight() {
const momentNow = moment();
return {
type: ACTIONS.UPDATE_IS_NIGHT,
data: { isNight: () => {
const startNightMoment = moment('19:00', 'HH:mm');
const endNightMoment = moment('8:00', 'HH:mm');
return !(momentNow.isAfter(endNightMoment) && momentNow.isBefore(startNightMoment));
}
data: { isNight: (() => {
const startNightMoment = moment('19:00', 'HH:mm');
const endNightMoment = moment('8:00', 'HH:mm');
return !(momentNow.isAfter(endNightMoment) && momentNow.isBefore(startNightMoment));
})()
},
};
}