diff --git a/components/cycle-day/symptoms/action-button-footer.js b/components/cycle-day/symptoms/action-button-footer.js index 28b78fb..f4b0618 100644 --- a/components/cycle-day/symptoms/action-button-footer.js +++ b/components/cycle-day/symptoms/action-button-footer.js @@ -1,7 +1,6 @@ import React, { Component } from 'react' import { - View, TouchableOpacity, Text, Alert, ToastAndroid -} from 'react-native' + View, TouchableOpacity, Text, Alert} from 'react-native' import Icon from 'react-native-vector-icons/MaterialCommunityIcons' import { saveSymptom } from '../../../db' import styles, {iconStyles} from '../../../styles' @@ -15,7 +14,6 @@ export default class ActionButtonFooter extends Component { currentSymptomValue, date, saveAction, - saveDisabled, navigate, autoShowDayView = true} = this.props @@ -47,40 +45,24 @@ export default class ActionButtonFooter extends Component { }, { title: labels.save, action: () => { - if(saveDisabled) { - ToastAndroid.show(labels.disabledInfo, ToastAndroid.LONG) - } else { - saveAction() - if (autoShowDayView) navigateToOverView() - } + saveAction() + if (autoShowDayView) navigateToOverView() }, - disabledCondition: saveDisabled, icon: 'content-save-outline' } ] return ( - - {buttons.map(({ title, action, disabledCondition, icon }, i) => { + + {buttons.map(({ title, action, icon }, i) => { const textStyle = [styles.menuText] - if (disabledCondition) { - textStyle.push(styles.menuTextInActive) - } - const iconStyle = disabledCondition ? - Object.assign( - {}, - iconStyles.menuIcon, - iconStyles.menuIconInactive - ) - : - iconStyles.menuIcon return ( - + {title.toLowerCase()} diff --git a/components/cycle-day/symptoms/cervix.js b/components/cycle-day/symptoms/cervix.js index d0e3e07..c47cfe0 100644 --- a/components/cycle-day/symptoms/cervix.js +++ b/components/cycle-day/symptoms/cervix.js @@ -10,7 +10,6 @@ import { cervix as labels } from '../../../i18n/en/cycle-day' import ActionButtonFooter from './action-button-footer' import SelectTabGroup from '../select-tab-group' import SymptomSection from './symptom-section' -import { ActionHint } from '../../app-text' export default class Cervix extends Component { constructor(props) { @@ -36,7 +35,7 @@ export default class Cervix extends Component { { label: labels.position.categories[1], value: 1 }, { label: labels.position.categories[2], value: 2 } ] - const mandatoryNotCompletedYet = typeof this.state.opening != 'number' || typeof this.state.firmness != 'number' + const mandatoryNotCompleted = typeof this.state.opening != 'number' || typeof this.state.firmness != 'number' return ( @@ -83,7 +82,6 @@ export default class Cervix extends Component { /> - {labels.actionHint} diff --git a/components/cycle-day/symptoms/mucus.js b/components/cycle-day/symptoms/mucus.js index 6e2d2ce..ff5865e 100644 --- a/components/cycle-day/symptoms/mucus.js +++ b/components/cycle-day/symptoms/mucus.js @@ -11,7 +11,6 @@ import computeNfpValue from '../../../lib/nfp-mucus' import ActionButtonFooter from './action-button-footer' import SelectTabGroup from '../select-tab-group' import SymptomSection from './symptom-section' -import { ActionHint } from '../../app-text' export default class Mucus extends Component { constructor(props) { @@ -71,7 +70,6 @@ export default class Mucus extends Component { /> - {labels.actionHint}