feat(Map): Conditionally render blocks/challenges

This commit is contained in:
Berkeley Martinez
2018-01-02 18:08:50 -08:00
committed by mrugesh mohapatra
parent 1e491d82d3
commit 4db584d6cc
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ export class Block extends PureComponent {
key={ title } key={ title }
onSelect={ this.handleSelect } onSelect={ this.handleSelect }
> >
{ this.renderChallenges(challenges) } { isOpen && this.renderChallenges(challenges) }
</Panel> </Panel>
); );
} }

View File

@ -109,7 +109,7 @@ export class SuperBlock extends PureComponent {
> >
{ this.renderMessage(message) } { this.renderMessage(message) }
<div className={ `${ns}-accordion-block` }> <div className={ `${ns}-accordion-block` }>
{ this.renderBlocks(blocks) } { isOpen && this.renderBlocks(blocks) }
</div> </div>
</Panel> </Panel>
); );