Skip to content
Snippets Groups Projects
Commit 201fb5e2 authored by Stefanie Grewenig's avatar Stefanie Grewenig
Browse files

move hard coded headers and explainers from bleeding into cycle day i18n

- issue: 127
- by: sg
parent 5a40f6cb
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
} from 'react-native' } from 'react-native'
import styles from '../../../styles' import styles from '../../../styles'
import { saveSymptom } from '../../../db' import { saveSymptom } from '../../../db'
import { bleeding as labels } from '../../../i18n/en/cycle-day' import { bleeding } from '../../../i18n/en/cycle-day'
import ActionButtonFooter from './action-button-footer' import ActionButtonFooter from './action-button-footer'
import SelectTabGroup from '../select-tab-group' import SelectTabGroup from '../select-tab-group'
import SymptomSection from './symptom-section' import SymptomSection from './symptom-section'
...@@ -25,17 +25,17 @@ export default class Bleeding extends Component { ...@@ -25,17 +25,17 @@ export default class Bleeding extends Component {
render() { render() {
const bleedingRadioProps = [ const bleedingRadioProps = [
{ label: labels[0], value: 0 }, { label: bleeding.labels[0], value: 0 },
{ label: labels[1], value: 1 }, { label: bleeding.labels[1], value: 1 },
{ label: labels[2], value: 2 }, { label: bleeding.labels[2], value: 2 },
{ label: labels[3], value: 3 }, { label: bleeding.labels[3], value: 3 },
] ]
return ( return (
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<ScrollView style={styles.page}> <ScrollView style={styles.page}>
<SymptomSection <SymptomSection
header="Heaviness" header={bleeding.heaviness.header}
explainer="How heavy is the bleeding?" explainer={bleeding.heaviness.explainer}
> >
<SelectTabGroup <SelectTabGroup
buttons={bleedingRadioProps} buttons={bleedingRadioProps}
...@@ -44,8 +44,8 @@ export default class Bleeding extends Component { ...@@ -44,8 +44,8 @@ export default class Bleeding extends Component {
/> />
</SymptomSection> </SymptomSection>
<SymptomSection <SymptomSection
header="Exclude" header={bleeding.exclude.header}
explainer="You can exclude this value if it's not menstrual bleeding" explainer={bleeding.exclude.explainer}
inline={true} inline={true}
> >
<Switch <Switch
......
export const bleeding = ['spotting', 'light', 'medium', 'heavy']
export const mucusNFP = ['t', 'Ø', 'f', 'S', 'S+'] export const mucusNFP = ['t', 'Ø', 'f', 'S', 'S+']
export const intensity = ['low', 'medium', 'high'] export const intensity = ['low', 'medium', 'high']
export const bleeding = {
labels: ['spotting', 'light', 'medium', 'heavy'],
heaviness: {
header: "Heaviness",
explainer: "How heavy is the bleeding?",
},
exclude: {
header: "Exclude",
explainer: "You can exclude this value if it's not menstrual bleeding"
}
}
export const cervix = { export const cervix = {
opening: { opening: {
categories: ['closed', 'medium', 'open'], categories: ['closed', 'medium', 'open'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment