import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; export default function GoalTracker() { const [goal, setGoal] = useState(""); const [goals, setGoals] = useState([]); const addGoal = () => { if (goal.trim() === "") return; setGoals([...goals, { text: goal, completed: false }]); setGoal(""); }; const completeGoal = (index) => { const updatedGoals = [...goals]; updatedGoals[index].completed = true; setGoals(updatedGoals); }; return (