Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter * fix: add isUpcomingChange Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com> * feat: hide blocks not challenges Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com> Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6b081c7e7b
commit
bd68b70f3d
@@ -60,8 +60,6 @@ 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)
|
||||
);
|
||||
|
@@ -111,7 +111,7 @@ export class Map extends Component {
|
||||
|
||||
render() {
|
||||
const { nodes } = this.props;
|
||||
// if a given superBlock's nodes have been filtered (via isHidden, say) that
|
||||
// if a given superBlock's nodes have been filtered that
|
||||
// superBlock will not appear in superBlocks and will not be rendered.
|
||||
const superBlocks = uniq(nodes.map(({ superBlock }) => superBlock));
|
||||
return (
|
||||
|
@@ -19,7 +19,6 @@ export const Landing = ({ page = 'landing' }) => {
|
||||
const data = useStaticQuery(graphql`
|
||||
query certifications {
|
||||
challenges: allChallengeNode(
|
||||
filter: { isHidden: { eq: false } }
|
||||
sort: { fields: [superOrder, order, challengeOrder] }
|
||||
) {
|
||||
nodes {
|
||||
|
Reference in New Issue
Block a user