Use nothing-changed helper in home to prevent unnecessary render
This commit is contained in:
@@ -5,6 +5,7 @@ import Moment from 'moment'
|
||||
import { settings as labels } from '../components/labels'
|
||||
import { getOrCreateCycleDay, getBleedingDaysSortedByDate } from '../db'
|
||||
import cycleModule from './cycle'
|
||||
import nothingChanged from '../helpers/db-unchanged'
|
||||
|
||||
export default function setupNotifications(navigate) {
|
||||
Notification.configure({
|
||||
@@ -80,7 +81,3 @@ function setupPeriodReminder() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function nothingChanged(dbChanges) {
|
||||
return Object.values(dbChanges).every(changeArray => changeArray.length === 0)
|
||||
}
|
||||
Reference in New Issue
Block a user