From ec03a1fbac22d9bc71d96a89c587c5e03a787a3e Mon Sep 17 00:00:00 2001 From: Job Vonk Date: Sun, 24 Nov 2024 14:28:25 +0100 Subject: [PATCH] fix: hide intro information when enabled field is set to false --- src/static-pages/index.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/static-pages/index.jsx b/src/static-pages/index.jsx index 166ac33..4819e88 100644 --- a/src/static-pages/index.jsx +++ b/src/static-pages/index.jsx @@ -19,7 +19,8 @@ const Index = ({ data }) => { const mainPartner = data.allContentfulPartner.edges.filter( edge => edge.node.isMainPartner )[0].node; - const hasIntroInformation = !!data.allContentfulIntroInformation.nodes.length; + const hasIntroInformation = + data.allContentfulIntroInformation.nodes[0].enabled; const IndexWrapper = IndexWrapperFactory(hasIntroInformation); return ( @@ -69,7 +70,7 @@ export const indexQuery = graphql` } allContentfulIntroInformation { nodes { - id + enabled } } allContentfulPartner {