Remove line in bleeding and change wording

This commit is contained in:
Liv
2024-01-17 15:45:10 +01:00
parent 8db4424df5
commit eda7d9c7f3
2 changed files with 12 additions and 5 deletions
+10 -3
View File
@@ -23,6 +23,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
const symptomConfig = symptomPage[symptom] const symptomConfig = symptomPage[symptom]
const [data, setData] = useState(symptomData ? symptomData : blank[symptom]) const [data, setData] = useState(symptomData ? symptomData : blank[symptom])
const [shouldShowInfo, setShouldShowInfo] = useState(false) const [shouldShowInfo, setShouldShowInfo] = useState(false)
const isBleeding = symptom === 'bleeding'
const getParsedData = () => JSON.parse(JSON.stringify(data)) const getParsedData = () => JSON.parse(JSON.stringify(data))
const onPressLearnMore = () => setShouldShowInfo(!shouldShowInfo) const onPressLearnMore = () => setShouldShowInfo(!shouldShowInfo)
const onEditNote = (note) => { const onEditNote = (note) => {
@@ -137,10 +138,16 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
save={(value, field) => onSaveTemperature(value, field)} save={(value, field) => onSaveTemperature(value, field)}
/> />
)} )}
{/* There should not be a line between the bleeding tab group and the exclude toggle */}
{shouldShow(symptomConfig.selectTabGroups) && {shouldShow(symptomConfig.selectTabGroups) &&
symptomPage[symptom].selectTabGroups.map((group) => { symptomPage[symptom].selectTabGroups.map((group) => {
return ( return (
<Segment key={group.key} style={styles.segmentBorder}> <Segment
key={group.key}
style={styles.segmentBorder}
last={isBleeding}
>
<AppText style={styles.title}>{group.title}</AppText> <AppText style={styles.title}>{group.title}</AppText>
<SelectTabGroup <SelectTabGroup
activeButton={data[group.key]} activeButton={data[group.key]}
@@ -152,7 +159,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
})} })}
{/*for bleeding, we want to move the "exclude" toggle up between the tab and box groups, all other symptoms should still have it at the bottom*/} {/*for bleeding, we want to move the "exclude" toggle up between the tab and box groups, all other symptoms should still have it at the bottom*/}
{symptom === 'bleeding' && excludeToggle} {isBleeding && excludeToggle}
{shouldShow(symptomConfig.selectBoxGroups) && {shouldShow(symptomConfig.selectBoxGroups) &&
symptomPage[symptom].selectBoxGroups.map((group) => { symptomPage[symptom].selectBoxGroups.map((group) => {
@@ -181,7 +188,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
) )
})} })}
{symptom !== 'bleeding' && excludeToggle} {!isBleeding && excludeToggle}
{shouldShow(symptomConfig.note) && ( {shouldShow(symptomConfig.note) && (
<Segment style={styles.segmentBorder}> <Segment style={styles.segmentBorder}>
+2 -2
View File
@@ -47,7 +47,7 @@ export const cervix = {
explainer: 'How high up in the vagina is the cervix?', explainer: 'How high up in the vagina is the cervix?',
}, },
excludeExplainer: excludeExplainer:
"You can exclude this value if you don't want to use it for fertility detection.", "You can exclude these values if you don't want to use them for fertility detection.",
actionHint: 'Choose values for at least "Opening" and "Firmness" to save.', actionHint: 'Choose values for at least "Opening" and "Firmness" to save.',
} }
@@ -66,7 +66,7 @@ export const mucus = {
'Looking at and touching your cervical mucus, which describes it best?', 'Looking at and touching your cervical mucus, which describes it best?',
}, },
excludeExplainer: excludeExplainer:
"You can exclude this value if you don't want to use it for fertility detection", "You can exclude these values if you don't want to use them for fertility detection",
actionHint: 'Choose values for both "Feeling" and "Texture" to save.', actionHint: 'Choose values for both "Feeling" and "Texture" to save.',
} }