import React, { useState } from 'react'; import { chapters } from '../education/chapters'; import { Card } from './ui/card'; import { ScrollArea } from './ui/scroll-area'; import { Button } from './ui/button'; export function EducationPanel() { const [selected, setSelected] = useState(chapters[0].id); const [completed, setCompleted] = useState([]); const chapter = chapters.find(c => c.id === selected); const markComplete = (id: number) => { if (!completed.includes(id)) { setCompleted([...completed, id]); } }; return (

Foundation Curriculum

{completed.length}/{chapters.length} Complete
    {chapters.map(c => (
  • {completed.includes(c.id) && ( )}
  • ))}
') : '' }} />
); }