Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MVarshini committed Jun 7, 2023
1 parent be35409 commit 7573220
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { SHOW_COPIED_TEXT_MS } from "assets/constants/copyTextConstants";
const ClipboardCopy = ({ copyText }) => {
const [isCopied, setIsCopied] = useState(false);

const copyTextToClipboard = async (text) => {
/* Funcion has to be rewritten by removing document.execCommand() on upgrading to HTTPS */
const copyTextToClipboard = async (text) =>
"clipboard" in navigator
? await navigator.clipboard.writeText(text)
: document.execCommand("copy", true, text);
};

// onClick handler function for the copy button
const handleCopyClick = () => {
Expand Down

0 comments on commit 7573220

Please sign in to comment.