From 36b2a8f2d73650f454fb883df8bc2e55b5ef186e Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 14 Jun 2023 14:46:10 +0100 Subject: [PATCH] Progress container update --- src/components/HeroSection/FavoriteRoadmaps.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/HeroSection/FavoriteRoadmaps.tsx b/src/components/HeroSection/FavoriteRoadmaps.tsx index 2738a5b98..2b6845a4c 100644 --- a/src/components/HeroSection/FavoriteRoadmaps.tsx +++ b/src/components/HeroSection/FavoriteRoadmaps.tsx @@ -38,7 +38,7 @@ function renderProgress(progressList: UserProgressResponse) { export function FavoriteRoadmaps() { const [isPreparing, setIsPreparing] = useState(true); - const [isLoading, setIsLoading] = useState(false); + const [isLoading, setIsLoading] = useState(true); const [progress, setProgress] = useState([]); const [containerOpacity, setContainerOpacity] = useState(0); @@ -77,8 +77,8 @@ export function FavoriteRoadmaps() { useEffect(() => { loadProgress().finally(() => { setIsLoading(false); + showProgressContainer(); }); - showProgressContainer(); }, []); if (isPreparing) { @@ -94,8 +94,8 @@ export function FavoriteRoadmaps() { }`} >
- {!isLoading && progress.length == 0 && } {isLoading && } + {!isLoading && progress.length == 0 && } {!isLoading && progress.length > 0 && ( )}