Replace getOrCreateCycleDay
This commit is contained in:
@@ -3,7 +3,7 @@ import Notification from 'react-native-push-notification'
|
||||
import { LocalDate } from 'js-joda'
|
||||
import Moment from 'moment'
|
||||
import { settings as labels } from '../components/labels'
|
||||
import { getOrCreateCycleDay, getBleedingDaysSortedByDate } from '../db'
|
||||
import { getBleedingDaysSortedByDate } from '../db'
|
||||
import cycleModule from './cycle'
|
||||
import nothingChanged from '../db/db-unchanged'
|
||||
|
||||
@@ -11,9 +11,7 @@ export default function setupNotifications(navigate) {
|
||||
Notification.configure({
|
||||
onNotification: (notification) => {
|
||||
if (notification.id === '1') {
|
||||
const todayDateString = LocalDate.now().toString()
|
||||
const cycleDay = getOrCreateCycleDay(todayDateString)
|
||||
navigate('TemperatureEditView', { cycleDay })
|
||||
navigate('TemperatureEditView', { date: LocalDate.now().toString() })
|
||||
} else {
|
||||
navigate('Home')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user