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] 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()], }, ], };