merging work on secondary symptom logic and buttons

This commit is contained in:
wunderfisch
2024-02-14 10:26:13 +01:00
parent 1662bb29f0
commit ebbfd8aba5
+12 -22
View File
@@ -121,15 +121,17 @@ const Settings = () => {
? labels.periodPrediction.on
: labels.periodPrediction.off
// old
// const onCervixToggle = (value) => {
// if (isMucusTrackingCategoryEnabled && isCervixTrackingCategoryEnabled) {
// setShouldUseCervix(value)
// saveUseCervix(value)
// }
// }
const secondarySymptomButtons = [
{
label: 'cervical mucus',
value: 0,
},
{
label: 'cervix',
value: 1,
},
]
// new
const onSelectTab = (value) => {
if (isMucusTrackingCategoryEnabled && isCervixTrackingCategoryEnabled) {
setShouldUseCervix(value)
@@ -180,18 +182,6 @@ const Settings = () => {
}
}
//new
const secondarySymptomButtons = [
{
label: 'cervical mucus',
value: 0,
},
{
label: 'cervix',
value: 1,
},
]
const cervixText = shouldUseCervix
? labels.useCervix.cervixModeOn
: labels.useCervix.cervixModeOff
@@ -285,11 +275,11 @@ const Settings = () => {
<Pressable onPress={secSymptomDisabledPrompt}>
<Segment title={labels.useCervix.title}>
{/* hier war vorher der AppSwitch */}
{/* noch condition adden */}
{/* noch condition adden like isSecondarySymptomDisabled */}
{isTemperatureTrackingCategoryEnabled && (
<>
<AppText>{cervixText}</AppText>
<SelectTabGroup
activeButton={shouldUseCervix}
buttons={secondarySymptomButtons}