import { HtmlHistory } from "../../../utils/types";
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
import { Button } from "../ui/button";
export default function History({
history,
setHtml,
}: {
history: HtmlHistory[];
setHtml: (html: string) => void;
}) {
return (
{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,
})}
))}
//
setVisible(true)}
// onMouseLeave={() => setVisible(false)}
// >
//
//
//
//
Version History
//
// This is a list of the full history of what AI has done to
// this.
//
//
// {htmlHistory?.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,
// }
// )}
//
//
//
//
// ))}
//
//
//
//
);
}