import { useEffect, useState } from "react"; interface DateDisplayProps { date?: Date; className?: string; } export default function DateDisplay({ date = new Date(), className = "", }: DateDisplayProps) { const formattedDate = date.toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric", }); const [now, setNow] = useState(new Date()); useEffect(() => { const timer = setInterval(() => { setNow(new Date()); }, 1000); return () => clearInterval(timer); }, []); const hours = now.getHours(); const minutes = now.getMinutes(); const seconds = now.getSeconds(); return (