Merge branch 'app-page-rendering-update' into 'master'
Improves readability of app page rendering See merge request bloodyhealth/drip!210
This commit is contained in:
+3
-5
@@ -110,8 +110,9 @@ export default class App extends Component {
|
||||
Stats,
|
||||
...symptomViews
|
||||
}
|
||||
const page = pages[currentPage]
|
||||
const Page = pages[currentPage]
|
||||
const title = headerTitlesLowerCase[currentPage]
|
||||
|
||||
return (
|
||||
<View style={{flex: 1}}>
|
||||
{this.isDefaultView() &&
|
||||
@@ -136,10 +137,7 @@ export default class App extends Component {
|
||||
})}
|
||||
/>}
|
||||
|
||||
{React.createElement(page, {
|
||||
navigate: this.navigate,
|
||||
...currentProps
|
||||
})}
|
||||
<Page navigate={this.navigate} {...currentProps} />
|
||||
|
||||
{!this.isSymptomView() &&
|
||||
<Menu navigate={this.navigate} currentPage={currentPage} />
|
||||
|
||||
Reference in New Issue
Block a user