1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-17 22:28:32 +01:00

fix: showcase roadmap index (#6283)

This commit is contained in:
Arik Chakma 2024-07-30 17:18:22 +06:00 committed by GitHub
parent bff7c4203a
commit b35ce9ab60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -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}`);
},
}; };
} }

View File

@ -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'>