diff --git a/src/api/roadmap.ts b/src/api/roadmap.ts index 2072a4fac..dab4e6fcb 100644 --- a/src/api/roadmap.ts +++ b/src/api/roadmap.ts @@ -30,5 +30,10 @@ export function roadmapApi(context: APIContext) { searchParams, ); }, + isShowcaseRoadmap: async function (slug: string) { + return api(context).get<{ + isShowcase: boolean; + }>(`${import.meta.env.PUBLIC_API_URL}/v1-is-showcase-roadmap/${slug}`); + }, }; } diff --git a/src/pages/r/[customRoadmapSlug].astro b/src/pages/r/[customRoadmapSlug].astro index e72b34c9f..5d133a578 100644 --- a/src/pages/r/[customRoadmapSlug].astro +++ b/src/pages/r/[customRoadmapSlug].astro @@ -4,13 +4,19 @@ import { CustomRoadmap } from '../../components/CustomRoadmap/CustomRoadmap'; import { SkeletonRoadmapHeader } from '../../components/CustomRoadmap/SkeletonRoadmapHeader'; import Loader from '../../components/Loader.astro'; import ProgressHelpPopup from '../../components/ProgressHelpPopup.astro'; +import { roadmapApi } from '../../api/roadmap'; export const prerender = false; const { customRoadmapSlug } = Astro.params; + +const roadmapClient = roadmapApi(Astro); +const { response, error } = await roadmapClient.isShowcaseRoadmap( + customRoadmapSlug!, +); --- - +