diff --git a/www/app/transcripts/shareLink.tsx b/www/app/transcripts/shareLink.tsx index ee7882e8..912f1e8b 100644 --- a/www/app/transcripts/shareLink.tsx +++ b/www/app/transcripts/shareLink.tsx @@ -1,10 +1,13 @@ -import React, { useState, useRef } from "react"; +import React, { useState, useRef, useEffect, use } from "react"; const ShareLink = () => { const [isCopied, setIsCopied] = useState(false); const inputRef = useRef(null); + const [currentUrl, setCurrentUrl] = useState(); - const currentURL = window.location.href; + useEffect(() => { + setCurrentUrl(window.location.href); + }, []); const handleCopyClick = () => { if (inputRef.current) { @@ -31,7 +34,7 @@ const ShareLink = () => {