Skip to content
Snippets Groups Projects
Commit 767aa238 authored by Julia Friesel's avatar Julia Friesel
Browse files

Merge branch 'app-page-rendering-update' into 'master'

Improves readability of app page rendering

See merge request bloodyhealth/drip!210
parents 92e02c48 3449746e
No related branches found
No related tags found
No related merge requests found
...@@ -110,8 +110,9 @@ export default class App extends Component { ...@@ -110,8 +110,9 @@ export default class App extends Component {
Stats, Stats,
...symptomViews ...symptomViews
} }
const page = pages[currentPage] const Page = pages[currentPage]
const title = headerTitlesLowerCase[currentPage] const title = headerTitlesLowerCase[currentPage]
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
{this.isDefaultView() && {this.isDefaultView() &&
...@@ -136,10 +137,7 @@ export default class App extends Component { ...@@ -136,10 +137,7 @@ export default class App extends Component {
})} })}
/>} />}
{React.createElement(page, { <Page navigate={this.navigate} {...currentProps} />
navigate: this.navigate,
...currentProps
})}
{!this.isSymptomView() && {!this.isSymptomView() &&
<Menu navigate={this.navigate} currentPage={currentPage} /> <Menu navigate={this.navigate} currentPage={currentPage} />
......
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