diff --git a/redirects.json b/redirects.json index eaa1766f807..e5809d2cd2e 100644 --- a/redirects.json +++ b/redirects.json @@ -334,5 +334,9 @@ { "fromPath": "/*/staking/withdraws", "toPath": "/:splat/staking/withdrawals/" + }, + { + "fromPath": "/*/writing-cohort", + "toPath": "https://ethereumwriterscohort.carrd.co/" } ] diff --git a/src/components/Banners/Implementations/WritersCohortBanner.tsx b/src/components/Banners/Implementations/WritersCohortBanner.tsx new file mode 100644 index 00000000000..747cefd9005 --- /dev/null +++ b/src/components/Banners/Implementations/WritersCohortBanner.tsx @@ -0,0 +1,28 @@ +import React from "react" +import { Text } from "@chakra-ui/react" + +import DismissableBanner from "../DismissableBanner" +import Link from "../../Link" + +interface IProps { + pathname: string +} + +const WritersCohortBanner = ({ pathname }) => { + if (pathname.includes("contributing") || pathname.includes("community")) { + return ( + + + Join the first-ever ethereum.org Writers Cohort, starting May 11th.{" "} + + Sign up here! + + + + ) + } + + return null +} + +export default WritersCohortBanner diff --git a/src/pages/community.tsx b/src/pages/community.tsx index e74d4e928b1..e2329366a24 100644 --- a/src/pages/community.tsx +++ b/src/pages/community.tsx @@ -22,6 +22,7 @@ import PageMetadata from "../components/PageMetadata" import Translation from "../components/Translation" import PageHero from "../components/PageHero" import FeedbackCard from "../components/FeedbackCard" +import WritersCohortBanner from "../components/Banners/Implementations/WritersCohortBanner" import { getImage } from "../utils/image" @@ -141,6 +142,7 @@ interface IGetInvolvedCard { const CommunityPage = ({ data, + location, }: PageProps) => { const { t } = useTranslation() const theme = useTheme() @@ -207,6 +209,8 @@ const CommunityPage = ({ title={t("page-community-meta-title")} description={t("page-community-meta-description")} /> + {/* TODO: REMOVE MAY 11 */} + ) => { const { language } = useI18next() @@ -246,6 +248,8 @@ const StaticPage = ({ translationString={postMergeBannerTranslationString!} /> )} + {/* TODO: REMOVE MAY 11 */} +