diff --git a/apps/codeforafrica/src/lib/data/pagify/index.js b/apps/codeforafrica/src/lib/data/pagify/index.js index f67f7321b..074c84300 100644 --- a/apps/codeforafrica/src/lib/data/pagify/index.js +++ b/apps/codeforafrica/src/lib/data/pagify/index.js @@ -7,10 +7,9 @@ const COLLECTION_BY_SLUG = { }; async function pagify(parentPage, api, context) { - const { slug: collection, meta = {} } = parentPage; + const { slug: collection } = parentPage; const pageProps = COLLECTION_BY_SLUG[collection]; - const props = (await pageProps?.(api, context)) ?? null; - return { ...props, meta }; + return pageProps?.(api, context) ?? null; } export default pagify; diff --git a/apps/codeforafrica/src/lib/data/pagify/members.js b/apps/codeforafrica/src/lib/data/pagify/members.js index 4e7b841d1..e2bd7ea9f 100644 --- a/apps/codeforafrica/src/lib/data/pagify/members.js +++ b/apps/codeforafrica/src/lib/data/pagify/members.js @@ -15,6 +15,11 @@ async function members(api, context) { return null; } const [member] = docs; + const meta = { + title: member.name, + description: member.decription, + image: member.image, + }; return { blocks: [ { @@ -25,6 +30,7 @@ async function members(api, context) { blockType: "about-page-entity", }, ], + meta, }; } diff --git a/apps/codeforafrica/src/lib/data/pagify/partners.js b/apps/codeforafrica/src/lib/data/pagify/partners.js index d625c7120..1d7109311 100644 --- a/apps/codeforafrica/src/lib/data/pagify/partners.js +++ b/apps/codeforafrica/src/lib/data/pagify/partners.js @@ -15,6 +15,11 @@ async function partners(api, context) { return null; } const [partner] = docs; + const meta = { + title: partner.name, + description: partner.decription, + image: partner.image, + }; return { blocks: [ { @@ -24,6 +29,7 @@ async function partners(api, context) { blockType: "about-page-entity", }, ], + meta, }; }