Skip to content
Snippets Groups Projects
Commit 84be9900 authored by emelko's avatar emelko
Browse files

Handles the back navigation from info symptom to CycleDay

parent 8d3d04af
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,8 @@ export default class App extends Component { ...@@ -51,7 +51,8 @@ export default class App extends Component {
if (isMenuItem(this.state.currentPage)) { if (isMenuItem(this.state.currentPage)) {
this.menuOrigin = this.state.currentPage this.menuOrigin = this.state.currentPage
} }
if (this.state.currentPage !== 'InfoSymptom') { if (!isSymptomView(this.state.currentPage) &&
this.state.currentPage !== 'InfoSymptom') {
this.originForSymptomView = this.state.currentPage this.originForSymptomView = this.state.currentPage
} }
this.setState({currentPage: pageName, currentProps: props}) this.setState({currentPage: pageName, currentProps: props})
...@@ -69,8 +70,10 @@ export default class App extends Component { ...@@ -69,8 +70,10 @@ export default class App extends Component {
this.navigate(this.menuOrigin) this.navigate(this.menuOrigin)
} else if (this.state.currentPage === 'InfoSymptom') { } else if (this.state.currentPage === 'InfoSymptom') {
this.navigate( this.navigate(
this.originForSymptomView, { date: this.state.currentProps.date } this.state.currentProps.symptomView, {
) date: this.state.currentProps.date,
cycleDay: this.state.currentProps.cycleDay
})
} else { } else {
this.navigate('Home') this.navigate('Home')
} }
......
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