Fix symptom headers

This commit is contained in:
Julia Friesel
2018-08-20 15:14:17 +02:00
parent 559aa684dc
commit e2b9d4b4a1
8 changed files with 17 additions and 7 deletions
+2 -1
View File
@@ -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),
@@ -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}
-1
View File
@@ -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
-1
View File
@@ -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}
-1
View File
@@ -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
-1
View File
@@ -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"
-1
View File
@@ -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
+15
View File
@@ -31,3 +31,18 @@ export const settings = {
}
}
}
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'
}