garrensmith commented on a change in pull request #971: WIP - Refactor
documents/mango addon to use Redux
URL: https://github.com/apache/couchdb-fauxton/pull/971#discussion_r136062872
##########
File path: app/addons/documents/header/header.js
##########
@@ -62,14 +63,14 @@ export default class BulkDocumentHeaderController extends
React.Component {
// TODO: migrate completely to redux and eliminate this check.
const layout = changeLayout ? selectedLayout : this.state.selectedLayout;
let metadata, json, table;
- if ((typeOfIndex && typeOfIndex === 'view') || !this.state.isMango) {
+ if ((typeOfIndex && typeOfIndex === 'view')) {
metadata = <Button
className={layout === Constants.LAYOUT_ORIENTATION.METADATA ?
'active' : ''}
onClick={this.toggleLayout.bind(this,
Constants.LAYOUT_ORIENTATION.METADATA)}
>
Metadata
</Button>;
- } else if (this.state.isMangoIndexList) {
+ } else if ((typeOfIndex && typeOfIndex === 'MangoIndex')) {
Review comment:
This can be implified to `if (typeOfIndex === 'MangoIndex')`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services