diff --git a/frontend/src/components/frame/Frame.jsx b/frontend/src/components/frame/Frame.jsx index a2ef1b1..9dfd570 100644 --- a/frontend/src/components/frame/Frame.jsx +++ b/frontend/src/components/frame/Frame.jsx @@ -54,7 +54,7 @@ const Frame = ({ const dispatch = useDispatch(); const [isFullScreen, setFullScreen] = useState(false); const [isExpand, setExpand] = useState(true); - + const [showCopyPopup, setShowCopyPopup] = useState(false); // const downloadMenu = () => ( // onDownload(e)}> // @@ -69,6 +69,14 @@ const Frame = ({ // // ); + const handleOnClickCopyToEditor = () => { + setShowCopyPopup(true); + setTimeout(() => { + setShowCopyPopup(false); + }, 2000); + dispatch(setCommand(reqString)); + }; + return (
@@ -82,11 +90,12 @@ const Frame = ({ title="copy to editor" icon={faClone} size="s" - onClick={() => dispatch(setCommand(reqString))} + onClick={handleOnClickCopyToEditor} style={{ cursor: 'pointer', }} /> + {showCopyPopup &&
Copied to editor
}
{!isTable && onThick ? (