1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-19 15:43:49 +02:00

Progress container update

This commit is contained in:
Kamran Ahmed
2023-06-14 14:46:10 +01:00
parent 00e9d44ba9
commit 36b2a8f2d7

View File

@@ -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);
@@ -77,8 +77,8 @@ export function FavoriteRoadmaps() {
useEffect(() => {
loadProgress().finally(() => {
setIsLoading(false);
showProgressContainer();
});
showProgressContainer();
}, []);
if (isPreparing) {
@@ -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} />
)}