From 749042e4339cb48064e0c2433f7d0ac850abbfcc Mon Sep 17 00:00:00 2001 From: houssemmimoun27 Date: Mon, 22 May 2023 10:40:47 +0100 Subject: [PATCH] feat: add registration form url --- .env | 1 + environment.d.ts | 1 + src/lib/config.ts | 3 ++- src/pages/faq.tsx | 14 +++++++++----- src/types/config.type.ts | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 2654a280..0d90e482 100644 --- a/.env +++ b/.env @@ -14,6 +14,7 @@ OKP4_DOCS_NODES_URL='https://docs.okp4.network/docs/nodes/introduction' OKP4_DOCS_LOGIC_MODULE_URL='https://docs.okp4.network/modules/next/logic' OKP4_DOCS_FAQ_URL='https://docs.okp4.network/docs/faq' OKP4_TECHNICAL_DOCS_URL='https://docs.okp4.network/tech-documentation/ecosystem-overview' +OKP4_REGISTRATION_FORM_URL='https://okp4.typeform.com/buildersprogram' OKP4_DISCORD_NEMETON_URL='https://discord.gg/25mwbfkmKJ' OKP4_DISCORD_TICKET_URL='https://discord.gg/sZRmPVxp3C' OKP4_DISCORD_CHANNEL_URL='https://discord.com/channels/946759919678406696' diff --git a/environment.d.ts b/environment.d.ts index d459bd5a..66781335 100644 --- a/environment.d.ts +++ b/environment.d.ts @@ -15,6 +15,7 @@ declare namespace NodeJS { OKP4_DOCS_NODES_URL: string OKP4_DOCS_FAQ_URL: string OKP4_TECHNICAL_DOCS_URL: string + OKP4_REGISTRATION_FORM_URL: string OKP4_DISCORD_NEMETON_URL: string OKP4_DISCORD_TICKET_URL: string OKP4_DISCORD_CHANNEL_URL: string diff --git a/src/lib/config.ts b/src/lib/config.ts index 367b3c21..b17fdaca 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -26,7 +26,8 @@ export const config: Config = { nodesUrl: process.env.OKP4_DOCS_NODES_URL, faqUrl: process.env.OKP4_DOCS_FAQ_URL, logicModuleUrl: process.env.OKP4_DOCS_LOGIC_MODULE_URL, - technicalDocsUrl: process.env.OKP4_TECHNICAL_DOCS_URL + technicalDocsUrl: process.env.OKP4_TECHNICAL_DOCS_URL, + registrationFormUrl: process.env.OKP4_REGISTRATION_FORM_URL }, supportUrls: { discordNemetonUrl: process.env.OKP4_DISCORD_NEMETON_URL, diff --git a/src/pages/faq.tsx b/src/pages/faq.tsx index 8c9a49e0..740d92c9 100644 --- a/src/pages/faq.tsx +++ b/src/pages/faq.tsx @@ -22,6 +22,7 @@ type ValidatorsFaqUrls = { type BuildersFaqUrls = { discordChannelUrl: string discordTicketChannelUrl: string + registrationFormUrl: string } export type FaqProps = Pick @@ -321,8 +322,11 @@ const buildersFaqContent = (urls: BuildersFaqUrls): FaqContent[] => [ answer: (

While you can contribute directly to the code & documentation in the Github repos, we advise - you to complete the [registration form] to help you define your potential contribution and - to onboard you into the Builders Program. + you to complete the{' '} + + registration form + {' '} + to help you define your potential contribution and to onboard you into the Builders Program.

) }, @@ -367,7 +371,7 @@ const Faq: NextPage = props => { const { urls } = props const { socialMediaUrls: { discordUrl }, - docsUrls: { whitepaperUrl, nodesUrl, faqUrl }, + docsUrls: { whitepaperUrl, nodesUrl, faqUrl, registrationFormUrl }, supportUrls: { discordChannelUrl, discordTicketChannelUrl } } = urls const [activeIndex, setActiveIndex] = useAccordion() @@ -377,9 +381,9 @@ const Faq: NextPage = props => { const faqContent = useMemo( () => isBuilderPage - ? buildersFaqContent({ discordChannelUrl, discordTicketChannelUrl }) + ? buildersFaqContent({ discordChannelUrl, discordTicketChannelUrl, registrationFormUrl }) : validatorsFaqContent({ discordUrl }), - [discordChannelUrl, discordTicketChannelUrl, discordUrl, isBuilderPage] + [discordChannelUrl, discordTicketChannelUrl, discordUrl, isBuilderPage, registrationFormUrl] ) const handleClick = (index: number) => () => { diff --git a/src/types/config.type.ts b/src/types/config.type.ts index 6942e0ed..bddcbc6f 100644 --- a/src/types/config.type.ts +++ b/src/types/config.type.ts @@ -61,6 +61,7 @@ export type Config = { faqUrl: string logicModuleUrl: string technicalDocsUrl: string + registrationFormUrl: string } supportUrls: { discordNemetonUrl: string