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 [data, setData] = useState(symptomData ? symptomData : blank[symptom])
const [shouldShowInfo, setShouldShowInfo] = useState(false)
const isBleeding = symptom === 'bleeding'
const getParsedData = () => JSON.parse(JSON.stringify(data))
const onPressLearnMore = () => setShouldShowInfo(!shouldShowInfo)
const onEditNote = (note) => {
@@ -137,10 +138,16 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
save={(value, field) => onSaveTemperature(value, field)}
/>
)}
{/* There should not be a line between the bleeding tab group and the exclude toggle */}
{shouldShow(symptomConfig.selectTabGroups) &&
symptomPage[symptom].selectTabGroups.map((group) => {
return (
<Segment key={group.key} style={styles.segmentBorder}>
<Segment
key={group.key}
style={styles.segmentBorder}
last={isBleeding}
>
<AppText style={styles.title}>{group.title}</AppText>
<SelectTabGroup
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*/}
{symptom === 'bleeding' && excludeToggle}
{isBleeding && excludeToggle}
{shouldShow(symptomConfig.selectBoxGroups) &&
symptomPage[symptom].selectBoxGroups.map((group) => {
@@ -181,7 +188,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
)
})}
{symptom !== 'bleeding' && excludeToggle}
{!isBleeding && excludeToggle}
{shouldShow(symptomConfig.note) && (
<Segment style={styles.segmentBorder}>