mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-01-17 14:18:17 +01:00
fix: hide loading screen on error (#7798)
This commit is contained in:
parent
64a31481e7
commit
9d65c49b8d
@ -93,6 +93,15 @@ export function CustomRoadmap(props: CustomRoadmapProps) {
|
|||||||
hideRoadmapLoader();
|
hideRoadmapLoader();
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!error) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIsLoading(false);
|
||||||
|
hideRoadmapLoader();
|
||||||
|
}, [error]);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ export function useCustomRoadmap(options: UseCustomRoadmapOptions) {
|
|||||||
|
|
||||||
return httpGet(roadmapUrl.toString());
|
return httpGet(roadmapUrl.toString());
|
||||||
},
|
},
|
||||||
|
retry: false,
|
||||||
enabled: !!(slug || id),
|
enabled: !!(slug || id),
|
||||||
},
|
},
|
||||||
queryClient,
|
queryClient,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user