I have a problem copying text after the async method execution.
Here is my code: https://codesandbox.io/s/strange-dawn-4s0jy5?file=/src/App.js
import copyClipboard from 'copy-text-to-clipboard'
const delayTime = (ms: number) => new Promise((res) => setTimeout(res, ms))
---------------------------------------------------------------------------
const copyText1= `copy text 1`
copyClipboard(copyText1)
await delayTime(5000)
const copyText2= `copy text 2`
copyClipboard(copyText2)
I always return a "Copy Text 1"
I expected my copy is "Copy Text 2". What's the solution?
Thanks