Skip to content

Commit

Permalink
feat: add registration form url
Browse files Browse the repository at this point in the history
  • Loading branch information
houssemmimoun27 committed May 22, 2023
1 parent 6568160 commit 749042e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 9 additions & 5 deletions src/pages/faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type ValidatorsFaqUrls = {
type BuildersFaqUrls = {
discordChannelUrl: string
discordTicketChannelUrl: string
registrationFormUrl: string
}

export type FaqProps = Pick<Config, 'title' | 'keywords' | 'description' | 'urls'>
Expand Down Expand Up @@ -321,8 +322,11 @@ const buildersFaqContent = (urls: BuildersFaqUrls): FaqContent[] => [
answer: (
<p>
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{' '}
<a href={urls.registrationFormUrl} rel="noreferrer" target="_blank">
registration form
</a>{' '}
to help you define your potential contribution and to onboard you into the Builders Program.
</p>
)
},
Expand Down Expand Up @@ -367,7 +371,7 @@ const Faq: NextPage<FaqProps> = props => {
const { urls } = props
const {
socialMediaUrls: { discordUrl },
docsUrls: { whitepaperUrl, nodesUrl, faqUrl },
docsUrls: { whitepaperUrl, nodesUrl, faqUrl, registrationFormUrl },
supportUrls: { discordChannelUrl, discordTicketChannelUrl }
} = urls
const [activeIndex, setActiveIndex] = useAccordion()
Expand All @@ -377,9 +381,9 @@ const Faq: NextPage<FaqProps> = 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) => () => {
Expand Down
1 change: 1 addition & 0 deletions src/types/config.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export type Config = {
faqUrl: string
logicModuleUrl: string
technicalDocsUrl: string
registrationFormUrl: string
}
supportUrls: {
discordNemetonUrl: string
Expand Down

0 comments on commit 749042e

Please sign in to comment.