import { History as HistoryIcon } from "lucide-react"; import { HtmlHistory } from "@/types"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Button } from "@/components/ui/button"; export function History({ history, setHtml, }: { history: HtmlHistory[]; setHtml: (html: string) => void; }) { return (
History
    {history?.map((item, index) => (
  • {item.prompt} {new Date(item.createdAt).toLocaleDateString("en-US", { month: "2-digit", day: "2-digit", year: "2-digit", }) + " " + new Date(item.createdAt).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false, })}
  • ))}
); }