Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ft/codeforafrica join our slack #588

Merged
merged 8 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion apps/codeforafrica/src/pages/[...slugs].page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 OurImpact from "@/codeforafrica/components/OurImpact";
Expand All @@ -13,12 +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,
Expand Down
29 changes: 29 additions & 0 deletions apps/codeforafrica/src/payload/blocks/JoinOurSlack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: "Subtitle",
required: true,
type: "text",
},
{
name: "action",
label: "Action",
type: "group",
fields: [link()],
},
],
};

export default JoinOurSlack;
2 changes: 2 additions & 0 deletions apps/codeforafrica/src/payload/collections/Pages.js
Original file line number Diff line number Diff line change
@@ -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 OurImpact from "../blocks/OurImpact";
import OurPartners from "../blocks/OurPartners";
import PageHeader from "../blocks/PageHeader";
Expand Down Expand Up @@ -41,6 +42,7 @@ const Pages = {
blocks: [
Error,
Hero,
JoinOurSlack,
OurImpact,
PageHeader,
CustomPageHeader,
Expand Down