improve and clean
This commit is contained in:
parent
8eb7f58988
commit
4795901e12
2 changed files with 1 additions and 2 deletions
|
@ -67,7 +67,7 @@ function isNight() {
|
|||
const startNightMoment = moment('19:00', 'HH:mm');
|
||||
const endNightTime = moment('8:00', 'HH:mm');
|
||||
const momentNow = moment();
|
||||
return momentNow.isAfter(endNightTime) && momentNow.isBefore(startNightMoment) ? false : true;
|
||||
return !(momentNow.isAfter(endNightTime) && momentNow.isBefore(startNightMoment));
|
||||
}
|
||||
|
||||
export function doUpdateIsNight() {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import * as SETTINGS from 'constants/settings';
|
||||
import { createSelector } from 'reselect';
|
||||
import moment from 'moment';
|
||||
|
||||
const selectState = state => state.settings || {};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue