From b783d9bdefbf0b54c7f18f2dbbf16a2a021b1fec Mon Sep 17 00:00:00 2001 From: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com> Date: Mon, 29 Apr 2024 18:07:24 +0400 Subject: [PATCH] CORE-4888: fix file path (#1158) (#1159) * CORE-4888: fix file path * CORE-4888: space issue * CORE-4888: fix data flow --- netlify-cms.config.yml | 4 +-- pages/governance/advisory.jsx | 2 +- pages/governance/supporters.jsx | 4 +-- templates/governance/supporters/index.jsx | 33 ++++++++++++----------- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/netlify-cms.config.yml b/netlify-cms.config.yml index 302a7362..a324136b 100644 --- a/netlify-cms.config.yml +++ b/netlify-cms.config.yml @@ -1438,7 +1438,7 @@ collections: delete: false label: 🎓 Advisory Board - label_singular: member + label_singular: section description: > Advisory Board members and their details. @@ -1462,7 +1462,7 @@ collections: to have good performance in search engines. - name: members label: Advisory Board Members - file: advisory-board/advisory.yml + file: advisory/advisory.yml fields: - name: data widget: list diff --git a/pages/governance/advisory.jsx b/pages/governance/advisory.jsx index 3408cc3d..8ce617d8 100644 --- a/pages/governance/advisory.jsx +++ b/pages/governance/advisory.jsx @@ -20,7 +20,7 @@ const getSections = async ({ ref } = {}) => { Object.values(content).forEach((section) => { setAssetsUrl(section) - if (section.box) setAssetsUrl(section.box) + if (section.table) setAssetsUrl(section.table) }) return content diff --git a/pages/governance/supporters.jsx b/pages/governance/supporters.jsx index e5f68fb1..360464ec 100644 --- a/pages/governance/supporters.jsx +++ b/pages/governance/supporters.jsx @@ -15,14 +15,14 @@ const setAssetsUrl = (object) => }) const getSections = async ({ ref } = {}) => { - const content = await retrieveContent('board-supporters ', { + const content = await retrieveContent('board-supporters', { ref, transform: 'object', }) Object.values(content).forEach((section) => { setAssetsUrl(section) - if (section.box) setAssetsUrl(section.box) + if (section.items) setAssetsUrl(section.items) }) return content diff --git a/templates/governance/supporters/index.jsx b/templates/governance/supporters/index.jsx index c991c273..e23dff4f 100644 --- a/templates/governance/supporters/index.jsx +++ b/templates/governance/supporters/index.jsx @@ -102,26 +102,26 @@ const GovernanceSupportersPageTemplate = ({ meta, supporters, members }) => {
- {supporters.headerLink.map((item) => ( + {supporters.items.headerLink.map((item) => ( {item.link} ))}
-

{supporters.ourPrinciples.title}

+

{supporters.items.ourPrinciples.title}

- {supporters.ourPrinciples.cardsDescription.map((plan) => ( + {supporters.items.ourPrinciples.cardsDescription.map((plan) => ( ))}
@@ -130,24 +130,27 @@ const GovernanceSupportersPageTemplate = ({ meta, supporters, members }) => {
support
- {supporters.principles.description} + {supporters.items.principles.description}
-

{supporters.howItWorks.title}

+

{supporters.items.howItWorks.title}

- {supporters.howItWorks.services.map((plan) => ( + {supporters.items.howItWorks.services.map((plan) => ( ))}
-
-

{supporters.supporters.title}

+
+

{supporters.items.supporters.title}