import { useState } from "react";
import classNames from "classnames";
import { IoTimeOutline } from "react-icons/io5";
import Deepseek from "./../../assets/deepseek-color.svg";
function Tabs({
htmlHistory,
setHtml,
children,
}: {
htmlHistory?: { html: string; createdAt: Date; prompt: string }[];
setHtml: (html: string) => void;
children?: React.ReactNode;
}) {
const [visible, setVisible] = useState(false);
return (
{htmlHistory && htmlHistory?.length > 1 && (
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,
}
)}
))}
)}
);
}
export default Tabs;