import type { UserProgressResponse } from './FavoriteRoadmaps'; import { CheckIcon } from '../ReactIcons/CheckIcon'; import { MarkFavorite } from '../FeaturedItems/MarkFavorite'; import { Spinner } from '../ReactIcons/Spinner'; type ProgressListProps = { progress: UserProgressResponse; isLoading?: boolean; }; export function ProgressList(props: ProgressListProps) { const { progress, isLoading = false } = props; return (

{!isLoading && ( )} {isLoading && ( )} Your progress and favorite roadmaps.

{progress.map((resource) => { const url = resource.resourceType === 'roadmap' ? `/${resource.resourceId}` : `/best-practices/${resource.resourceId}`; const percentageDone = ((resource.skipped + resource.done) / resource.total) * 100; return ( {resource.resourceTitle} ); })}
); }