Mirrored from https://github.com/Camo67/OCIU-npo.git
Synced Nov 21, 06:00 UTC
fix/ociu-remove-placeholder-content
| 1 | import React, { useState } from 'react'; |
| 2 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; |
| 3 | import { Progress } from "@/components/ui/progress"; |
| 4 | import { Button } from "@/components/ui/button"; |
| 5 | import { Badge } from "@/components/ui/badge"; |
| 6 | import { BookOpen, CheckCircle, GraduationCap } from "lucide-react"; |
| 7 | |
| 8 | export const StudyBuddy = () => { |
| 9 | const [progress, setProgress] = useState(35); |
| 10 | |
| 11 | const lessons = [ |
| 12 | { title: "Introduction to React", status: "completed" }, |
| 13 | { title: "Understanding Props & State", status: "in-progress" }, |
| 14 | { title: "Hooks Deep Dive", status: "locked" }, |
| 15 | ]; |
| 16 | |
| 17 | return ( |
| 18 | <Card> |
| 19 | <CardHeader className="flex flex-row items-center justify-between"> |
| 20 | <div className="flex items-center gap-2"> |
| 21 | <GraduationCap className="text-primary" /> |
| 22 | <CardTitle>StudyBuddy Learning Progress</CardTitle> |
| 23 | </div> |
| 24 | <Badge variant="secondary">{progress}% Overall</Badge> |
| 25 | </CardHeader> |
| 26 | <CardContent className="space-y-6"> |
| 27 | <Progress value={progress} className="h-2" /> |
| 28 | |
| 29 | <div className="space-y-3"> |
| 30 | {lessons.map((lesson) => ( |
| 31 | <div key={lesson.title} className="flex items-center justify-between p-3 bg-muted/30 rounded-lg border border-border"> |
| 32 | <div className="flex items-center gap-3"> |
| 33 | {lesson.status === 'completed' ? ( |
| 34 | <CheckCircle className="text-growth h-5 w-5" /> |
| 35 | ) : ( |
| 36 | <BookOpen className="text-muted-foreground h-5 w-5" /> |
| 37 | )} |
| 38 | <span className={`text-sm ${lesson.status === 'locked' ? 'text-muted-foreground' : ''}`}> |
| 39 | {lesson.title} |
| 40 | </span> |
| 41 | </div> |
| 42 | <Button size="sm" variant={lesson.status === 'locked' ? 'ghost' : 'outline'} disabled={lesson.status === 'locked'}> |
| 43 | {lesson.status === 'completed' ? 'Review' : lesson.status === 'locked' ? 'Locked' : 'Continue'} |
| 44 | </Button> |
| 45 | </div> |
| 46 | ))} |
| 47 | </div> |
| 48 | |
| 49 | <div className="bg-primary/5 p-4 rounded-lg"> |
| 50 | <p className="text-xs font-medium text-primary uppercase mb-1">Buddy Suggestion</p> |
| 51 | <p className="text-sm">"Based on your projects, I recommend starting 'Responsive Design with Tailwind' next."</p> |
| 52 | </div> |
| 53 | </CardContent> |
| 54 | </Card> |
| 55 | ); |
| 56 | }; |