mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-20 08:02:35 +02:00
Progress container update
This commit is contained in:
@@ -38,7 +38,7 @@ function renderProgress(progressList: UserProgressResponse) {
|
|||||||
|
|
||||||
export function FavoriteRoadmaps() {
|
export function FavoriteRoadmaps() {
|
||||||
const [isPreparing, setIsPreparing] = useState(true);
|
const [isPreparing, setIsPreparing] = useState(true);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const [progress, setProgress] = useState<UserProgressResponse>([]);
|
const [progress, setProgress] = useState<UserProgressResponse>([]);
|
||||||
const [containerOpacity, setContainerOpacity] = useState(0);
|
const [containerOpacity, setContainerOpacity] = useState(0);
|
||||||
|
|
||||||
@@ -77,8 +77,8 @@ export function FavoriteRoadmaps() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadProgress().finally(() => {
|
loadProgress().finally(() => {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
});
|
|
||||||
showProgressContainer();
|
showProgressContainer();
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (isPreparing) {
|
if (isPreparing) {
|
||||||
@@ -94,8 +94,8 @@ export function FavoriteRoadmaps() {
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="container min-h-full">
|
<div className="container min-h-full">
|
||||||
{!isLoading && progress.length == 0 && <EmptyProgress />}
|
|
||||||
{isLoading && <EmptyProgress title="Loading progress .." />}
|
{isLoading && <EmptyProgress title="Loading progress .." />}
|
||||||
|
{!isLoading && progress.length == 0 && <EmptyProgress />}
|
||||||
{!isLoading && progress.length > 0 && (
|
{!isLoading && progress.length > 0 && (
|
||||||
<ProgressList progress={progress} />
|
<ProgressList progress={progress} />
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user