feat: hide isHidden challenges
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
d865e2cb0e
commit
68aef571ee
@@ -60,9 +60,12 @@ export class SuperBlock extends Component {
|
||||
const blocksForSuperBlock = nodes.filter(
|
||||
node => node.superBlock === superBlock
|
||||
);
|
||||
// since the nodes have been filtered based on isHidden, any blocks whose
|
||||
// nodes have been entirely removed will not appear in this array.
|
||||
const blockDashedNames = uniq(
|
||||
blocksForSuperBlock.map(({ block }) => block)
|
||||
);
|
||||
// render all non-empty blocks
|
||||
return (
|
||||
<ul>
|
||||
{blockDashedNames.map(blockDashedName => (
|
||||
|
@@ -111,6 +111,8 @@ export class Map extends Component {
|
||||
|
||||
render() {
|
||||
const { nodes } = this.props;
|
||||
// if a given superBlock's nodes have been filtered (via isHidden, say) that
|
||||
// superBlock will not appear in superBlocks and will not be rendered.
|
||||
const superBlocks = uniq(nodes.map(({ superBlock }) => superBlock));
|
||||
return (
|
||||
<Row>
|
||||
|
Reference in New Issue
Block a user