From d846f97810addad49790c4b2a27567529787674d Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:51:43 +0300 Subject: [PATCH 1/5] Join Our slack block --- .../images/cms/blocks/join_our_slack.jpg | Bin 0 -> 27679 bytes .../src/lib/data/blockify/index.js | 2 + .../src/lib/data/blockify/joinOurSlack.js | 14 +++++++ .../codeforafrica/src/lib/data/utils/index.js | 4 ++ .../src/pages/[...slugs].page.js | 2 + .../src/payload/blocks/JoinOurSlack.js | 37 ++++++++++++++++++ .../src/payload/collections/Pages.js | 10 ++++- 7 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 apps/codeforafrica/public/images/cms/blocks/join_our_slack.jpg create mode 100644 apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js create mode 100644 apps/codeforafrica/src/payload/blocks/JoinOurSlack.js diff --git a/apps/codeforafrica/public/images/cms/blocks/join_our_slack.jpg b/apps/codeforafrica/public/images/cms/blocks/join_our_slack.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1d245879abe99a2e8af38c84fc58af7d34a94c06 GIT binary patch literal 27679 zcmeFZ2UJr_+b|jrc0@&_ND&1D0Rbri=|?3LAz&b(g@95eGzq;Q3kX5r0MY`4W556j z1StVRRq0&}0YVj|_ue9K0swCA-Y8?82RFru zw0^;_9$#>9hnX~;RJ96H~?+{^Z@PvJAgD3lLOoZ$O06PhXD@(EWiDNUuPC3oIHK<7o0tP z`qb%jXV0HMclO-5^A|2%IL~^K_1rl&cD9R`E?;K9eEz}}jw_crnE2&ijhy&(CCkaP z%nL8Go?~U^{ukl+6M+3JVC~FxmJ>pN-`G#Eu%9??1PJ_^Yb+;z!T-G7Q)kYeJAIPn zw_n9(mjNeOeq%Y!a*E~j=}Tu=PBDk)H8ph|4EdY zo;>{<%c&D*n1$Nx%vHf8bNbX7R+e8h{|8m}(^qcFUcC>ojZffuYVSG0AtYz)^`iI; zr@VsV1FiQZpVzs8C}C)?h~2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~3hMY^Tqik`Z&PSia z68|SLd`I8CaIshmdt^8M#Qh)tNll+a+sB*}k>5(D*4);@{yRUVkb4Rn+8oWPa(hxGXJ(wC0-G9$h$ RjW2t|XS-Pfxwt=#{tFDcR4xDj literal 0 HcmV?d00001 diff --git a/apps/codeforafrica/src/lib/data/blockify/index.js b/apps/codeforafrica/src/lib/data/blockify/index.js index 8b522d11e..92dfd40f3 100644 --- a/apps/codeforafrica/src/lib/data/blockify/index.js +++ b/apps/codeforafrica/src/lib/data/blockify/index.js @@ -1,7 +1,9 @@ import hero from "./hero"; +import joinOurSlack from "./joinOurSlack"; const propsifyBlockBySlug = { hero, + "join-our-slack": joinOurSlack, }; async function blockify(blocks) { diff --git a/apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js b/apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js new file mode 100644 index 000000000..b7019f0d3 --- /dev/null +++ b/apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js @@ -0,0 +1,14 @@ +import { actionFromActionButton } from "@/codeforafrica/lib/data/utils"; + +function joinOurSlack(block) { + const { actionButton, ...other } = block; + const action = actionFromActionButton({ ...actionButton }); + + return { + ...other, + action, + slug: "join-our-slack", + }; +} + +export default joinOurSlack; diff --git a/apps/codeforafrica/src/lib/data/utils/index.js b/apps/codeforafrica/src/lib/data/utils/index.js index 28917e671..dec6d4775 100644 --- a/apps/codeforafrica/src/lib/data/utils/index.js +++ b/apps/codeforafrica/src/lib/data/utils/index.js @@ -2,4 +2,8 @@ export function imageFromMedia({ alt = null, url = null }) { return { alt, src: url }; } +export function actionFromActionButton({ href, label, newTab = false }) { + return { href, label, newTab }; +} + export default undefined; diff --git a/apps/codeforafrica/src/pages/[...slugs].page.js b/apps/codeforafrica/src/pages/[...slugs].page.js index 4557ba5fa..c53596ef9 100644 --- a/apps/codeforafrica/src/pages/[...slugs].page.js +++ b/apps/codeforafrica/src/pages/[...slugs].page.js @@ -5,6 +5,7 @@ import CustomPageHeader from "@/codeforafrica/components/CustomPageHeader"; import FeaturedProjects from "@/codeforafrica/components/FeaturedProjects"; import GetInvolved from "@/codeforafrica/components/GetInvolved"; import Hero from "@/codeforafrica/components/Hero"; +import JoinOurSlack from "@/codeforafrica/components/JoinOurSlack"; import MeetOurTeam from "@/codeforafrica/components/MeetOurTeam"; import NewsAndStories from "@/codeforafrica/components/NewsAndStories"; import OurPartners from "@/codeforafrica/components/OurPartners"; @@ -13,6 +14,7 @@ import { getPageServerSideProps } from "@/codeforafrica/lib/data"; const componentsBySlugs = { hero: Hero, + "join-our-slack": JoinOurSlack, "page-header": PageHeader, "custom-page-header": CustomPageHeader, "meet-our-team": MeetOurTeam, diff --git a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js new file mode 100644 index 000000000..22db7c795 --- /dev/null +++ b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js @@ -0,0 +1,37 @@ +import link from "../fields/links/link"; + +const JoinOurSlack = { + slug: "join-our-slack", + imageURL: "/images/cms/blocks/join_our_slack.jpg", + imageAltText: "Display link to join our Slack community", + fields: [ + { + name: "title", + label: "Title", + required: true, + type: "text", + }, + { + name: "subtitle", + label: "Sub Title", + required: true, + type: "text", + }, + { + name: "actionButton", + label: "Action Button", + type: "group", + fields: [ + { + name: "label", + label: "Label", + type: "text", + required: true, + }, + link({}), + ], + }, + ], +}; + +export default JoinOurSlack; diff --git a/apps/codeforafrica/src/payload/collections/Pages.js b/apps/codeforafrica/src/payload/collections/Pages.js index a8e034e7b..737ee7b34 100644 --- a/apps/codeforafrica/src/payload/collections/Pages.js +++ b/apps/codeforafrica/src/payload/collections/Pages.js @@ -1,6 +1,7 @@ import CustomPageHeader from "../blocks/CustomPageHeader"; import Error from "../blocks/Error"; import Hero from "../blocks/Hero"; +import JoinOurSlack from "../blocks/JoinOurSlack"; import OurPartners from "../blocks/OurPartners"; import PageHeader from "../blocks/PageHeader"; import fullTitle from "../fields/fullTitle"; @@ -37,7 +38,14 @@ const Pages = { // each other e.g. while alphabecially CustomPageHeader should be with C, // it's functiaonally equivalent with PageHeader so we keep it next to // PageHeader - blocks: [Error, Hero, PageHeader, CustomPageHeader, OurPartners], + blocks: [ + Error, + Hero, + JoinOurSlack, + PageHeader, + CustomPageHeader, + OurPartners, + ], admin: { initCollapsed: true, }, From fe4b9b1b7e12b344afb4d46a4c3167c0d6f8a982 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Fri, 15 Sep 2023 15:30:22 +0300 Subject: [PATCH 2/5] FIx null props issue --- apps/codeforafrica/src/lib/data/rest/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/codeforafrica/src/lib/data/rest/index.js b/apps/codeforafrica/src/lib/data/rest/index.js index 80c11bb13..b74fd48d6 100644 --- a/apps/codeforafrica/src/lib/data/rest/index.js +++ b/apps/codeforafrica/src/lib/data/rest/index.js @@ -37,6 +37,6 @@ export const api = { export async function getPageStaticProps(context) { const props = await getPageProps(api, context); return { - props, + props: props || {}, }; } From 981fdbed1e07925b7cf37bd3a52f656734ebf882 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:05:23 +0300 Subject: [PATCH 3/5] Update button action --- apps/codeforafrica/src/lib/data/blockify/index.js | 2 -- .../src/lib/data/blockify/joinOurSlack.js | 14 -------------- apps/codeforafrica/src/lib/data/rest/index.js | 9 ++++++++- apps/codeforafrica/src/lib/data/utils/index.js | 4 ---- .../src/payload/blocks/JoinOurSlack.js | 2 +- 5 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js diff --git a/apps/codeforafrica/src/lib/data/blockify/index.js b/apps/codeforafrica/src/lib/data/blockify/index.js index 92dfd40f3..8b522d11e 100644 --- a/apps/codeforafrica/src/lib/data/blockify/index.js +++ b/apps/codeforafrica/src/lib/data/blockify/index.js @@ -1,9 +1,7 @@ import hero from "./hero"; -import joinOurSlack from "./joinOurSlack"; const propsifyBlockBySlug = { hero, - "join-our-slack": joinOurSlack, }; async function blockify(blocks) { diff --git a/apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js b/apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js deleted file mode 100644 index b7019f0d3..000000000 --- a/apps/codeforafrica/src/lib/data/blockify/joinOurSlack.js +++ /dev/null @@ -1,14 +0,0 @@ -import { actionFromActionButton } from "@/codeforafrica/lib/data/utils"; - -function joinOurSlack(block) { - const { actionButton, ...other } = block; - const action = actionFromActionButton({ ...actionButton }); - - return { - ...other, - action, - slug: "join-our-slack", - }; -} - -export default joinOurSlack; diff --git a/apps/codeforafrica/src/lib/data/rest/index.js b/apps/codeforafrica/src/lib/data/rest/index.js index b74fd48d6..63517ea4b 100644 --- a/apps/codeforafrica/src/lib/data/rest/index.js +++ b/apps/codeforafrica/src/lib/data/rest/index.js @@ -36,7 +36,14 @@ export const api = { export async function getPageStaticProps(context) { const props = await getPageProps(api, context); + if (!props) { + return { + props: { + title: "Page not found", + }, + }; + } return { - props: props || {}, + props, }; } diff --git a/apps/codeforafrica/src/lib/data/utils/index.js b/apps/codeforafrica/src/lib/data/utils/index.js index dec6d4775..28917e671 100644 --- a/apps/codeforafrica/src/lib/data/utils/index.js +++ b/apps/codeforafrica/src/lib/data/utils/index.js @@ -2,8 +2,4 @@ export function imageFromMedia({ alt = null, url = null }) { return { alt, src: url }; } -export function actionFromActionButton({ href, label, newTab = false }) { - return { href, label, newTab }; -} - export default undefined; diff --git a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js index 22db7c795..05b013635 100644 --- a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js +++ b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js @@ -18,7 +18,7 @@ const JoinOurSlack = { type: "text", }, { - name: "actionButton", + name: "action", label: "Action Button", type: "group", fields: [ From 3cbaed3476166ec13b39f3612850c757dbb6c464 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:27:36 +0300 Subject: [PATCH 4/5] Join Our slack block update --- apps/codeforafrica/src/lib/data/rest/index.js | 7 ------- apps/codeforafrica/src/pages/[...slugs].page.js | 2 +- .../src/payload/blocks/JoinOurSlack.js | 14 +++----------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/apps/codeforafrica/src/lib/data/rest/index.js b/apps/codeforafrica/src/lib/data/rest/index.js index 63517ea4b..80c11bb13 100644 --- a/apps/codeforafrica/src/lib/data/rest/index.js +++ b/apps/codeforafrica/src/lib/data/rest/index.js @@ -36,13 +36,6 @@ export const api = { export async function getPageStaticProps(context) { const props = await getPageProps(api, context); - if (!props) { - return { - props: { - title: "Page not found", - }, - }; - } return { props, }; diff --git a/apps/codeforafrica/src/pages/[...slugs].page.js b/apps/codeforafrica/src/pages/[...slugs].page.js index ea0aefaeb..5bb05c241 100644 --- a/apps/codeforafrica/src/pages/[...slugs].page.js +++ b/apps/codeforafrica/src/pages/[...slugs].page.js @@ -14,13 +14,13 @@ import PageHeader from "@/codeforafrica/components/PageHeader"; import { getPageServerSideProps } from "@/codeforafrica/lib/data"; const componentsBySlugs = { + "get-involved": GetInvolved, hero: Hero, "join-our-slack": JoinOurSlack, "page-header": PageHeader, "custom-page-header": CustomPageHeader, "meet-our-team": MeetOurTeam, "news-stories": NewsAndStories, - "get-involved": GetInvolved, "our-impact": OurImpact, "our-partners": OurPartners, projects: FeaturedProjects, diff --git a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js index 05b013635..2037bfe8a 100644 --- a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js +++ b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js @@ -13,23 +13,15 @@ const JoinOurSlack = { }, { name: "subtitle", - label: "Sub Title", + label: "Subtitle", required: true, type: "text", }, { name: "action", - label: "Action Button", + label: "Action", type: "group", - fields: [ - { - name: "label", - label: "Label", - type: "text", - required: true, - }, - link({}), - ], + fields: [link()], }, ], }; From 5aa03d0dc9a741cffbadcf1ec32530275f98daad Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:13:54 +0300 Subject: [PATCH 5/5] Use linkGroup --- apps/codeforafrica/src/payload/blocks/JoinOurSlack.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js index 2037bfe8a..7bddbad80 100644 --- a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js +++ b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js @@ -1,4 +1,4 @@ -import link from "../fields/links/link"; +import linkGroup from "../fields/links/linkGroup"; const JoinOurSlack = { slug: "join-our-slack", @@ -17,12 +17,7 @@ const JoinOurSlack = { required: true, type: "text", }, - { - name: "action", - label: "Action", - type: "group", - fields: [link()], - }, + linkGroup({ overrides: { name: "action", label: "Action" } }), ], };