diff --git a/src/components/CustomRoadmap/CustomRoadmap.tsx b/src/components/CustomRoadmap/CustomRoadmap.tsx index c9e86684d..b8bba0b13 100644 --- a/src/components/CustomRoadmap/CustomRoadmap.tsx +++ b/src/components/CustomRoadmap/CustomRoadmap.tsx @@ -93,6 +93,15 @@ export function CustomRoadmap(props: CustomRoadmapProps) { hideRoadmapLoader(); }, [data]); + useEffect(() => { + if (!error) { + return; + } + + setIsLoading(false); + hideRoadmapLoader(); + }, [error]); + if (isLoading) { return null; } diff --git a/src/hooks/use-custom-roadmap.ts b/src/hooks/use-custom-roadmap.ts index 37a453d5c..2a9858835 100644 --- a/src/hooks/use-custom-roadmap.ts +++ b/src/hooks/use-custom-roadmap.ts @@ -34,6 +34,7 @@ export function useCustomRoadmap(options: UseCustomRoadmapOptions) { return httpGet(roadmapUrl.toString()); }, + retry: false, enabled: !!(slug || id), }, queryClient,