import { History } from "./history_types"; import toast from "react-hot-toast"; import classNames from "classnames"; import { HoverCard, HoverCardTrigger, HoverCardContent, } from "../ui/hover-card"; interface Props { history: History; currentVersion: number | null; revertToVersion: (version: number) => void; shouldDisableReverts: boolean; } // function displayHistoryItemType(itemType: HistoryItemType) { // switch (itemType) { // case "ai_create": // return "Create"; // case "ai_edit": // return "Edit"; // default: // // TODO: Error out since this is exhaustive // return "Unknown"; // } // } export default function HistoryDisplay({ history, currentVersion, revertToVersion, shouldDisableReverts, }: Props) { return history.length === 0 ? null : (