import { LESSONS } from '../data/lessons' import type { UserProgress } from '../types' import '../styles/typing.css' type Props = { progress: UserProgress onSelect: (lessonId: number) => void } export function LessonSelect({ progress, onSelect }: Props) { const isUnlocked = (lessonId: number) => { const lesson = LESSONS.find(l => l.id === lessonId) if (!lesson?.unlockAfter) return true return progress.completedLessons.includes(lesson.unlockAfter) } return (
Master each lesson to unlock the next ({progress.completedLessons.length}/{LESSONS.length} completed)