Skip to content

Commit

Permalink
Progress container update
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Jun 14, 2023
1 parent 00e9d44 commit 36b2a8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/HeroSection/FavoriteRoadmaps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<UserProgressResponse>([]);
const [containerOpacity, setContainerOpacity] = useState(0);

Expand Down Expand Up @@ -77,8 +77,8 @@ export function FavoriteRoadmaps() {
useEffect(() => {
loadProgress().finally(() => {
setIsLoading(false);
showProgressContainer();
});
showProgressContainer();
}, []);

if (isPreparing) {
Expand All @@ -94,8 +94,8 @@ export function FavoriteRoadmaps() {
}`}
>
<div className="container min-h-full">
{!isLoading && progress.length == 0 && <EmptyProgress />}
{isLoading && <EmptyProgress title="Loading progress .." />}
{!isLoading && progress.length == 0 && <EmptyProgress />}
{!isLoading && progress.length > 0 && (
<ProgressList progress={progress} />
)}
Expand Down

0 comments on commit 36b2a8f

Please sign in to comment.