import { HelpCircle } from 'lucide-react'; import { cn } from '../../lib/classname'; import type { ResourceType } from '../../lib/resource-progress'; import { useState } from 'react'; import { useStore } from '@nanostores/react'; import { canManageCurrentRoadmap, currentRoadmap } from '../../stores/roadmap'; import { ShareOptionsModal } from '../ShareOptions/ShareOptionsModal'; type ResourceProgressStatsProps = { resourceId: string; resourceType: ResourceType; isSecondaryBanner?: boolean; }; export function ResourceProgressStats(props: ResourceProgressStatsProps) { const { isSecondaryBanner = false } = props; const [isSharing, setIsSharing] = useState(false); const $canManageCurrentRoadmap = useStore(canManageCurrentRoadmap); const $currentRoadmap = useStore(currentRoadmap); return ( <> {isSharing && $canManageCurrentRoadmap && $currentRoadmap && ( setIsSharing(false)} onShareSettingsUpdate={(settings) => { currentRoadmap.set({ ...$currentRoadmap, ...settings, }); }} /> )}
0 of{' '} 0 Done
); }