diff --git a/components/CopyMenu.js b/components/CopyMenu.js index 7f953f0..afa8e23 100644 --- a/components/CopyMenu.js +++ b/components/CopyMenu.js @@ -54,7 +54,14 @@ function useClipboardSupport() { function CopyMenu({ isVisible, toggleVisibility, copyImage }) { const clipboardSupported = useClipboardSupport() - const [copy, { loading }] = useAsyncCallback(copyImage) + const [showCopied, { loading: copied }] = useAsyncCallback( + () => new Promise(res => setTimeout(res, 1000)) + ) + + const [copy, { loading }] = useAsyncCallback(async (...args) => { + await copyImage(...args) + showCopied() + }) return (