Improves readability of app page rendering
This commit is contained in:
+3
-5
@@ -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 {
|
|||||||
})}
|
})}
|
||||||
/>}
|
/>}
|
||||||
|
|
||||||
{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} />
|
||||||
|
|||||||
Reference in New Issue
Block a user