fix: showcase roadmap index (#6283)

pull/6284/head
Arik Chakma 4 months ago committed by GitHub
parent bff7c4203a
commit b35ce9ab60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      src/api/roadmap.ts
  2. 8
      src/pages/r/[customRoadmapSlug].astro

@ -30,5 +30,10 @@ export function roadmapApi(context: APIContext) {
searchParams, searchParams,
); );
}, },
isShowcaseRoadmap: async function (slug: string) {
return api(context).get<{
isShowcase: boolean;
}>(`${import.meta.env.PUBLIC_API_URL}/v1-is-showcase-roadmap/${slug}`);
},
}; };
} }

@ -4,13 +4,19 @@ import { CustomRoadmap } from '../../components/CustomRoadmap/CustomRoadmap';
import { SkeletonRoadmapHeader } from '../../components/CustomRoadmap/SkeletonRoadmapHeader'; import { SkeletonRoadmapHeader } from '../../components/CustomRoadmap/SkeletonRoadmapHeader';
import Loader from '../../components/Loader.astro'; import Loader from '../../components/Loader.astro';
import ProgressHelpPopup from '../../components/ProgressHelpPopup.astro'; import ProgressHelpPopup from '../../components/ProgressHelpPopup.astro';
import { roadmapApi } from '../../api/roadmap';
export const prerender = false; export const prerender = false;
const { customRoadmapSlug } = Astro.params; const { customRoadmapSlug } = Astro.params;
const roadmapClient = roadmapApi(Astro);
const { response, error } = await roadmapClient.isShowcaseRoadmap(
customRoadmapSlug!,
);
--- ---
<BaseLayout title='Roadmaps'> <BaseLayout title='Roadmaps' noIndex={!response?.isShowcase}>
<ProgressHelpPopup /> <ProgressHelpPopup />
<div> <div>
<div class='flex min-h-[550px] flex-col'> <div class='flex min-h-[550px] flex-col'>

Loading…
Cancel
Save