From cde9a098a816f7e69928493c20f3745c81593db6 Mon Sep 17 00:00:00 2001 From: nuno-aac Date: Thu, 9 Nov 2023 11:37:15 +0000 Subject: [PATCH] Fix roadmap 404 --- .../src/pages/roadmap/@slug/(components)/RoadmapPost.tsx | 6 +++++- .../website/src/pages/roadmap/@slug/index.page.server.tsx | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/workspaces/website/src/pages/roadmap/@slug/(components)/RoadmapPost.tsx b/workspaces/website/src/pages/roadmap/@slug/(components)/RoadmapPost.tsx index 1240b98577..b54f2c859c 100644 --- a/workspaces/website/src/pages/roadmap/@slug/(components)/RoadmapPost.tsx +++ b/workspaces/website/src/pages/roadmap/@slug/(components)/RoadmapPost.tsx @@ -36,6 +36,9 @@ const stages: KeyValuePairs = { }; export type RoadmapPostProps = { + env: { + CLOUDFLARE_RECAPTCHA_KEY: string; + }; roadmapPost: RoadmapPostType; roadmapVersion?: RoadmapVersion; locale: string; @@ -43,6 +46,7 @@ export type RoadmapPostProps = { } export default function RoadmapPost({ + env, roadmapPost, locale, roadmapVersion, @@ -140,7 +144,7 @@ export default function RoadmapPost({ - + } diff --git a/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx b/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx index 79fdc1ac93..3101cc7d6d 100644 --- a/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx +++ b/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx @@ -17,6 +17,9 @@ export async function onBeforeRender(pageContext: PageContextServer) { console.log('roadmapVersions', roadmapVersions) const pageProps: RoadmapPostProps = { + env: { + CLOUDFLARE_RECAPTCHA_KEY: import.meta.env.VITE_CLOUDFLARE_RECAPTCHA_KEY, + }, roadmapPost, roadmapVersion: roadmapVersions.find(r => r.version === roadmapPost.version)!, locale,