import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; const questions = [ { question: "Sebutkan aktivitas yang biasa dilakukan di pagi hari!", answers: [ { text: "Mandi", points: 30 }, { text: "Sarapan", points: 25 }, { text: "Olahraga", points: 20 }, { text: "Berangkat kerja/sekolah", points: 15 }, { text: "Minum kopi", points: 10 }, ], }, ]; export default function Family100() { const [revealed, setRevealed] = useState(Array(5).fill(false)); const [score, setScore] = useState(0); const revealAnswer = (index) => { if (!revealed[index]) { const newRevealed = [...revealed]; newRevealed[index] = true; setRevealed(newRevealed); setScore(score + questions[0].answers[index].points); } }; const resetGame = () => { setRevealed(Array(5).fill(false)); setScore(0); }; return (

🎉 Kuis Family 100 🎉

{questions[0].question}

{questions[0].answers.map((ans, idx) => ( ))}

Total Skor: {score}

); }