fix: hide loading screen on error (#7798)

pull/7799/head
Arik Chakma 2 months ago committed by GitHub
parent 64a31481e7
commit 9d65c49b8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      src/components/CustomRoadmap/CustomRoadmap.tsx
  2. 1
      src/hooks/use-custom-roadmap.ts

@ -93,6 +93,15 @@ export function CustomRoadmap(props: CustomRoadmapProps) {
hideRoadmapLoader();
}, [data]);
useEffect(() => {
if (!error) {
return;
}
setIsLoading(false);
hideRoadmapLoader();
}, [error]);
if (isLoading) {
return null;
}

@ -34,6 +34,7 @@ export function useCustomRoadmap(options: UseCustomRoadmapOptions) {
return httpGet(roadmapUrl.toString());
},
retry: false,
enabled: !!(slug || id),
},
queryClient,

Loading…
Cancel
Save