import classNames from "classnames"; import { useRef } from "react"; import { TbReload } from "react-icons/tb"; function Preview({ html, isResizing, isAiWorking, ref, }: { html: string; isResizing: boolean; isAiWorking: boolean; ref: React.RefObject; }) { const iframeRef = useRef(null); const handleRefreshIframe = () => { if (iframeRef.current) { const iframe = iframeRef.current; const content = iframe.srcdoc; iframe.srcdoc = ""; setTimeout(() => { iframe.srcdoc = content; }, 10); } }; return (