Separate warning out of absolute range

This commit is contained in:
Julia Friesel
2018-08-26 19:34:52 +02:00
parent 2a07ce4ef2
commit 8a6f943e5f
5 changed files with 55 additions and 70 deletions
@@ -8,7 +8,14 @@ import styles, {iconStyles} from '../../../styles'
export default class ActionButtonFooter extends Component {
render() {
const { symptom, cycleDay, saveAction, saveDisabled, navigate} = this.props
const {
symptom,
cycleDay,
saveAction,
saveDisabled,
navigate,
autoShowDayView = true}
= this.props
const navigateToOverView = () => navigate('CycleDay', {cycleDay})
const buttons = [
{
@@ -28,7 +35,7 @@ export default class ActionButtonFooter extends Component {
title: 'Save',
action: () => {
saveAction()
navigateToOverView()
if (autoShowDayView) navigateToOverView()
},
disabledCondition: saveDisabled,
icon: 'content-save-outline'