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:
Oliver Eyton-Williams
2020-09-04 00:07:40 +02:00
committed by GitHub
parent 6b081c7e7b
commit bd68b70f3d
1740 changed files with 151 additions and 1746 deletions

View File

@@ -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)
);

View File

@@ -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 (

View File

@@ -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 {