diff --git a/src/frontend/src/modals/chatModal/fileComponent/index.tsx b/src/frontend/src/modals/chatModal/fileComponent/index.tsx index 05a7859eb..6c20d58b1 100644 --- a/src/frontend/src/modals/chatModal/fileComponent/index.tsx +++ b/src/frontend/src/modals/chatModal/fileComponent/index.tsx @@ -1,6 +1,6 @@ import { CloudArrowDownIcon, DocumentIcon } from "@heroicons/react/24/outline"; import * as base64js from "base64-js"; -import Tooltip from "../../../components/TooltipComponent"; +import { useState } from "react"; export default function FileCard({ fileName, content, fileType }) { const handleDownload = () => { @@ -15,6 +15,38 @@ export default function FileCard({ fileName, content, fileType }) { document.body.removeChild(link); URL.revokeObjectURL(url); }; + const [isHovered, setIsHovered] = useState(false); + function handleMouseEnter() { + setIsHovered(true); + } + function handleMouseLeave() { + setIsHovered(false); + } + + if (fileType === "image") { + return ( +
+ generated image + {isHovered && ( +
+ +
+ )} +
+ ); + } return (