Change sympto module structure
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { detectTemperatureShift } from './sensiplan'
|
||||
import { detectTemperatureShift } from './sympto/temperature'
|
||||
import cycleModule from './cycle'
|
||||
|
||||
const getLastMensesStart = cycleModule().getLastMensesStart
|
||||
@@ -8,7 +8,7 @@ function getTemperatureFertilityStatus(targetDateString) {
|
||||
const lastMensesStart = getLastMensesStart(targetDateString)
|
||||
if (!lastMensesStart) return formatStatusForApp({ detected: false })
|
||||
const previousTemperaturesInCycle = getPreviousTemperaturesInCycle(targetDateString, lastMensesStart)
|
||||
// we get temps with latest first, but sensiplan module expects latest last
|
||||
// we get temps with latest first, but sympto module expects latest last
|
||||
previousTemperaturesInCycle.reverse()
|
||||
const status = detectTemperatureShift(previousTemperaturesInCycle)
|
||||
return formatStatusForApp(status)
|
||||
Reference in New Issue
Block a user