Skip to content

Commit

Permalink
remove redundant useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
plebeius-eth committed Mar 9, 2024
1 parent 54d30e9 commit d15fe5d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/views/settings/avatar-settings/avatar-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ const AvatarSettings = () => {
};

const [hasCopied, setHasCopied] = useState(false);
useEffect(() => {
if (hasCopied) {
setTimeout(() => setHasCopied(false), 2000);
}
}, [hasCopied]);

const copyMessageToSign = () => {
if (!chainTicker) {
Expand All @@ -89,6 +84,9 @@ const AvatarSettings = () => {
setTimestamp(newTimestamp);
navigator.clipboard.writeText(messageToSign);
setHasCopied(true);
setTimeout(() => {
setHasCopied(false);
}, 2000);
};

// how to resolve and verify NFT signatures https://github.com/plebbit/plebbit-js/blob/master/docs/nft.md
Expand Down

0 comments on commit d15fe5d

Please sign in to comment.