1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-16 21:58:30 +01:00

fix: hide loading screen on error (#7798)

This commit is contained in:
Arik Chakma 2024-11-27 13:27:51 +06:00 committed by GitHub
parent 64a31481e7
commit 9d65c49b8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

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

View File

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