import type { UserProgressResponse } from './FavoriteRoadmaps'; import { CheckIcon } from '../ReactIcons/CheckIcon'; import { MarkFavorite } from '../FeaturedItems/MarkFavorite'; import { Spinner } from '../ReactIcons/Spinner'; import type { ResourceType } from '../../lib/resource-progress'; import { MapIcon } from 'lucide-react'; type ProgressRoadmapProps = { url: string; percentageDone: number; allowFavorite?: boolean; resourceId: string; resourceType: ResourceType; resourceTitle: string; isFavorite?: boolean; }; function HeroRoadmap(props: ProgressRoadmapProps) { const { url, percentageDone, resourceType, resourceId, resourceTitle, isFavorite, allowFavorite = true, } = props; return ( {resourceTitle} {allowFavorite && ( )} ); } type ProgressTitleProps = { icon: any; isLoading?: boolean; title: string; }; export function HeroTitle(props: ProgressTitleProps) { const { isLoading = false, title, icon } = props; return (

{!isLoading && icon} {isLoading && ( )} {title}

); } type ProgressListProps = { progress: UserProgressResponse; showCustomRoadmaps?: boolean; customRoadmaps: any[]; // @fixme implement this isLoading?: boolean; }; export function HeroRoadmaps(props: ProgressListProps) { const { progress, isLoading = false, customRoadmaps = [{} /* @fixme implement this */], showCustomRoadmaps = false, } = props; return (
{ ) as any } isLoading={isLoading} title="Your progress and favorite roadmaps." /> }
{progress.map((resource) => ( ))}
{showCustomRoadmaps && (
{ } title="Your custom roadmaps" /> } {customRoadmaps.length === 0 && (

You haven't created any custom roadmaps yet.{' '}

)}
{customRoadmaps.map((customRoadmap) => ( ))}
)}
); }