Make periodPrediction on Calendar adjustable

This commit is contained in:
bl00dymarie
2024-01-05 20:17:24 +01:00
parent c7c905fd5f
commit 791c0d345f
+2
View File
@@ -2,6 +2,7 @@ import { LocalDate } from '@js-joda/core'
import { verticalScale } from 'react-native-size-matters'
import { Colors, Fonts, Sizes } from '../../styles'
import { periodPredictionObservable } from '../../local-storage'
const { shades } = Colors.iconColors.bleeding
@@ -26,6 +27,7 @@ export const toCalFormat = (bleedingDaysSortedByDate) => {
}
export const predictionToCalFormat = (predictedDays) => {
if (!periodPredictionObservable.value) return {}
if (!predictedDays.length) return {}
const todayDateString = LocalDate.now().toString()
const middleIndex = (predictedDays[0].length - 1) / 2