merging work on secondary symptom logic and buttons
This commit is contained in:
@@ -121,15 +121,17 @@ const Settings = () => {
|
|||||||
? labels.periodPrediction.on
|
? labels.periodPrediction.on
|
||||||
: labels.periodPrediction.off
|
: labels.periodPrediction.off
|
||||||
|
|
||||||
// old
|
const secondarySymptomButtons = [
|
||||||
// const onCervixToggle = (value) => {
|
{
|
||||||
// if (isMucusTrackingCategoryEnabled && isCervixTrackingCategoryEnabled) {
|
label: 'cervical mucus',
|
||||||
// setShouldUseCervix(value)
|
value: 0,
|
||||||
// saveUseCervix(value)
|
},
|
||||||
// }
|
{
|
||||||
// }
|
label: 'cervix',
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
// new
|
|
||||||
const onSelectTab = (value) => {
|
const onSelectTab = (value) => {
|
||||||
if (isMucusTrackingCategoryEnabled && isCervixTrackingCategoryEnabled) {
|
if (isMucusTrackingCategoryEnabled && isCervixTrackingCategoryEnabled) {
|
||||||
setShouldUseCervix(value)
|
setShouldUseCervix(value)
|
||||||
@@ -180,18 +182,6 @@ const Settings = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//new
|
|
||||||
const secondarySymptomButtons = [
|
|
||||||
{
|
|
||||||
label: 'cervical mucus',
|
|
||||||
value: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'cervix',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const cervixText = shouldUseCervix
|
const cervixText = shouldUseCervix
|
||||||
? labels.useCervix.cervixModeOn
|
? labels.useCervix.cervixModeOn
|
||||||
: labels.useCervix.cervixModeOff
|
: labels.useCervix.cervixModeOff
|
||||||
@@ -285,11 +275,11 @@ const Settings = () => {
|
|||||||
|
|
||||||
<Pressable onPress={secSymptomDisabledPrompt}>
|
<Pressable onPress={secSymptomDisabledPrompt}>
|
||||||
<Segment title={labels.useCervix.title}>
|
<Segment title={labels.useCervix.title}>
|
||||||
{/* hier war vorher der AppSwitch */}
|
{/* noch condition adden like isSecondarySymptomDisabled */}
|
||||||
{/* noch condition adden */}
|
|
||||||
{isTemperatureTrackingCategoryEnabled && (
|
{isTemperatureTrackingCategoryEnabled && (
|
||||||
<>
|
<>
|
||||||
<AppText>{cervixText}</AppText>
|
<AppText>{cervixText}</AppText>
|
||||||
|
|
||||||
<SelectTabGroup
|
<SelectTabGroup
|
||||||
activeButton={shouldUseCervix}
|
activeButton={shouldUseCervix}
|
||||||
buttons={secondarySymptomButtons}
|
buttons={secondarySymptomButtons}
|
||||||
|
|||||||
Reference in New Issue
Block a user