diff --git a/apps/codeforafrica/payload.config.ts b/apps/codeforafrica/payload.config.ts index cf05d7454..951bb651d 100644 --- a/apps/codeforafrica/payload.config.ts +++ b/apps/codeforafrica/payload.config.ts @@ -2,6 +2,7 @@ import path from "path"; import { buildConfig } from "payload/config"; import Authors from "./src/payload/collections/Authors"; +import GuidingPrinciples from "./src/payload/collections/GuidingPrinciples"; import Impact from "./src/payload/collections/Impact"; import Media from "./src/payload/collections/Media"; import Pages from "./src/payload/collections/Pages"; @@ -36,12 +37,14 @@ export default buildConfig({ serverURL: appURL, collections: [ Authors, + GuidingPrinciples, Impact, Pages, Media, Partners, Stories, Tags, + , ] as CollectionConfig[], globals: [Settings] as GlobalConfig[], admin: { diff --git a/apps/codeforafrica/public/images/cms/blocks/guiding_principles.png b/apps/codeforafrica/public/images/cms/blocks/guiding_principles.png new file mode 100644 index 000000000..1b5de838a Binary files /dev/null and b/apps/codeforafrica/public/images/cms/blocks/guiding_principles.png differ diff --git a/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.js b/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.js index f5a428752..de49a3549 100644 --- a/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.js +++ b/apps/codeforafrica/src/components/GuidingPrinciplesCard/GuidingPrinciplesCard.js @@ -2,9 +2,11 @@ import { RichTypography } from "@commons-ui/next"; import { Card, CardContent, CardMedia } from "@mui/material"; import React from "react"; +import RichText from "@/codeforafrica/components/RichText"; + const GuidingPrinciplesCard = React.forwardRef( function GuidingPrinciplesCard(props, ref) { - const { title, content, icon } = props; + const { title, description, icon } = props; return ( {title} - {content} + ); diff --git a/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.js b/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.js index b2e7041f0..99ed308f2 100644 --- a/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.js +++ b/apps/codeforafrica/src/components/GuidingPrinciplesCardList/GuidingPrinciplesCardList.js @@ -7,13 +7,20 @@ import GuidingPrinciplesCard from "../GuidingPrinciplesCard"; const GuidingPrinciplesCardList = React.forwardRef( function GuidingPrinciplesCardList(props, ref) { - const { list, title, ...other } = props; + const { list, title, sx } = props; if (!list?.length) { return null; } return ( -
+
{title} ({ ...doc, src: doc.url })], + }, }; export default Media; diff --git a/apps/codeforafrica/src/payload/collections/Pages.js b/apps/codeforafrica/src/payload/collections/Pages.js index efc35eefc..b8130c85f 100644 --- a/apps/codeforafrica/src/payload/collections/Pages.js +++ b/apps/codeforafrica/src/payload/collections/Pages.js @@ -3,6 +3,7 @@ import CustomPageHeader from "../blocks/CustomPageHeader"; import Error from "../blocks/Error"; import GetInTouch from "../blocks/GetInTouch"; import GetInvolved from "../blocks/GetInvolved"; +import GuidingPrinciples from "../blocks/GuidingPrinciples"; import Hero from "../blocks/Hero"; import JoinOurSlack from "../blocks/JoinOurSlack"; import MeetOurTeam from "../blocks/MeetOurTeam"; @@ -49,6 +50,7 @@ const Pages = { Error, GetInTouch, GetInvolved, + GuidingPrinciples, Hero, JoinOurSlack, MeetOurTeam,