Fix dark mode bug -- no longer always night
This commit is contained in:
parent
47e4f0029a
commit
bc818f5383
1 changed files with 5 additions and 5 deletions
|
@ -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));
|
||||
})()
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue