"use client" import { Play } from "lucide-react" import { Button } from "../../ui/button" interface TimeSliderProps { selectedTime: string onTimeChange: (time: string) => void } export function TimeSlider({ selectedTime, onTimeChange }: TimeSliderProps) { const times = ["19:00", "19:30", "20:00", "20:30", "21:00", "21:30", "22:00", "22:30", "23:00", "23:30", "00:00"] const currentDate = new Date() const formattedDate = `${currentDate.toLocaleDateString("en-US", { month: "short", day: "numeric", })}, ${currentDate.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit", })} GMT+7` return (
{formattedDate}
{/* Current time indicator */}
{/* Time slots */}
{times.map((time, index) => (
onTimeChange(time)} > {time}
))}
{/* Legend at the bottom */}
Tinggi
0-30 mnt
30-60 mnt
60-90 mnt
90-120 mnt
) }