From 26ce896bf38ee6c01bf2a2903b2abb52a089442b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 8 Mar 2021 13:22:57 +0100 Subject: [PATCH] update remix plugin --- src/views/HomeView.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/views/HomeView.tsx b/src/views/HomeView.tsx index d5f4908d86..af524be1c1 100644 --- a/src/views/HomeView.tsx +++ b/src/views/HomeView.tsx @@ -3,7 +3,7 @@ import { AppContext } from "../AppContext"; import { ContractName, Documentation } from "../types"; import { publish } from "../utils"; import { htmlTemplate } from "../utils/template"; -import { CopyToClipboard } from "react-copy-to-clipboard"; + export const HomeView: React.FC = () => { const [activeItem, setActiveItem] = useState(""); @@ -11,7 +11,6 @@ export const HomeView: React.FC = () => { const [htmlDocumentation, setHtmlDocumentation] = useState(""); const [hasErrorOnPublishing, setHasErrorOnPublishing] = useState(false); const [publishedURL, setPublishedURL] = useState(""); - const [isCopied, setIsCopied] = useState(false); const clearMessageFuncRef = useRef(undefined as any); useEffect(() => { @@ -87,7 +86,6 @@ export const HomeView: React.FC = () => { aria-pressed="false" onClick={() => { setPublishedURL(""); - setIsCopied(false); setActiveItem(item); displayDocumentation( clientInstance, @@ -111,7 +109,6 @@ export const HomeView: React.FC = () => { setContracts(new Map()); displayDocumentation(clientInstance, "", ""); setPublishedURL(""); - setIsCopied(false); }} > Clear @@ -125,16 +122,17 @@ export const HomeView: React.FC = () => { onClick={() => { console.log("Is publishing"); setIsPublishing(true); - setIsCopied(false); }} /> )} {!isPublishing && publishedURL !== "" && ( <> - -
{publishedURL}
- +
+ + {publishedURL} + +
)}