From e2b9d4b4a1d9b954ec46174ab7c2a88ce1caf2f1 Mon Sep 17 00:00:00 2001 From: Julia Friesel <julia.friesel@gmail.com> Date: Mon, 20 Aug 2018 15:14:17 +0200 Subject: [PATCH] Fix symptom headers --- app.js | 3 ++- components/cycle-day/symptoms/bleeding.js | 1 - components/cycle-day/symptoms/cervix.js | 1 - components/cycle-day/symptoms/desire.js | 1 - components/cycle-day/symptoms/mucus.js | 1 - components/cycle-day/symptoms/note.js | 1 - components/cycle-day/symptoms/sex.js | 1 - components/labels.js | 15 +++++++++++++++ 8 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index fe0f57c6..5e4b9bae 100644 --- a/app.js +++ b/app.js @@ -10,6 +10,7 @@ import Chart from './components/chart/chart' import Settings from './components/settings' import Stats from './components/stats' import styles from './styles' +import {headerTitles as titles} from './components/labels' // this is until react native fixes this bugg, see // https://github.com/facebook/react-native/issues/18868#issuecomment-382671739 @@ -53,7 +54,7 @@ export default class App extends Component { return ( <View style={styles.menuOnBottom}> - {this.state.currentPage != 'CycleDay' && <Header title={this.state.currentPage} />} + {this.state.currentPage != 'CycleDay' && <Header title={titles[this.state.currentPage]} />} {React.createElement(page, { navigate: this.navigate.bind(this), diff --git a/components/cycle-day/symptoms/bleeding.js b/components/cycle-day/symptoms/bleeding.js index ce27ba19..277c4009 100644 --- a/components/cycle-day/symptoms/bleeding.js +++ b/components/cycle-day/symptoms/bleeding.js @@ -35,7 +35,6 @@ export default class Bleeding extends Component { return ( <View style={styles.menuOnBottom}> <View> - <Text style={styles.symptomDayView}>Bleeding</Text> <View style={styles.radioButtonRow}> <RadioForm radio_props={bleedingRadioProps} diff --git a/components/cycle-day/symptoms/cervix.js b/components/cycle-day/symptoms/cervix.js index 2de55821..25730a4e 100644 --- a/components/cycle-day/symptoms/cervix.js +++ b/components/cycle-day/symptoms/cervix.js @@ -51,7 +51,6 @@ export default class Cervix extends Component { return ( <View style={styles.menuOnBottom}> <View> - <Text style={styles.symptomDayView}>Cervix</Text> <Text style={styles.symptomDayView}>Opening</Text> <View style={styles.radioButtonRow}> <RadioForm diff --git a/components/cycle-day/symptoms/desire.js b/components/cycle-day/symptoms/desire.js index 351dc971..ecb356b0 100644 --- a/components/cycle-day/symptoms/desire.js +++ b/components/cycle-day/symptoms/desire.js @@ -30,7 +30,6 @@ export default class Desire extends Component { return ( <View style={styles.menuOnBottom}> <View> - <Text style={styles.symptomDayView}>Desire</Text> <View style={styles.radioButtonRow}> <RadioForm radio_props={desireRadioProps} diff --git a/components/cycle-day/symptoms/mucus.js b/components/cycle-day/symptoms/mucus.js index 2df033d0..107da9fc 100644 --- a/components/cycle-day/symptoms/mucus.js +++ b/components/cycle-day/symptoms/mucus.js @@ -49,7 +49,6 @@ export default class Mucus extends Component { return ( <View style={styles.menuOnBottom}> <View> - <Text style={styles.symptomDayView}>Mucus</Text> <Text style={styles.symptomDayView}>Feeling</Text> <View style={styles.radioButtonRow}> <RadioForm diff --git a/components/cycle-day/symptoms/note.js b/components/cycle-day/symptoms/note.js index 6100a7ac..6be5ac7a 100644 --- a/components/cycle-day/symptoms/note.js +++ b/components/cycle-day/symptoms/note.js @@ -25,7 +25,6 @@ export default class Temp extends Component { return ( <View style={styles.menuOnBottom}> <View style={styles.symptomViewRow}> - <Text style={styles.symptomDayView}>Note</Text> <TextInput multiline={true} placeholder="Enter" diff --git a/components/cycle-day/symptoms/sex.js b/components/cycle-day/symptoms/sex.js index 9adb224b..fc8174ef 100644 --- a/components/cycle-day/symptoms/sex.js +++ b/components/cycle-day/symptoms/sex.js @@ -33,7 +33,6 @@ export default class Sex extends Component { return ( <View style={styles.menuOnBottom}> <View> - <Text style={styles.symptomDayView}>SEX</Text> <View style={styles.symptomViewRowInline}> <Text style={styles.symptomDayView}>{activityLabels.solo}</Text> <CheckBox diff --git a/components/labels.js b/components/labels.js index 99400a2d..1d3258a9 100644 --- a/components/labels.js +++ b/components/labels.js @@ -30,4 +30,19 @@ export const settings = { message: 'Data successfully imported' } } +} + +export const headerTitles = { + Home: 'Home', + Calendar: 'Calendar', + Chart: 'Chart', + Stats: 'Statistics', + Settings: 'Settings', + BleedingEditView: 'Bleeding', + TemperatureEditView: 'Temperature', + MucusEditView: 'Mucus', + CervixEditView: 'Cervix', + NoteEditView: 'Note', + DesireEditView: 'Desire', + SexEditView: 'Sex' } \ No newline at end of file -- GitLab