diff --git a/src/components/modal/ShareModal.js b/src/components/modal/ShareModal.js index 090ff2f..37c49dd 100644 --- a/src/components/modal/ShareModal.js +++ b/src/components/modal/ShareModal.js @@ -45,7 +45,6 @@ const ShareModal = ({ payload }) => { const [copied, setCopied] = useState(false); const copyTimeout = useRef(null); - const qrOpenTimeout = useRef(null); const blurProps = Platform.OS === "android" ? { experimentalBlurMethod: "dimezisBlurView" } @@ -70,9 +69,6 @@ const ShareModal = ({ payload }) => { if (copyTimeout.current) { clearTimeout(copyTimeout.current); } - if (qrOpenTimeout.current) { - clearTimeout(qrOpenTimeout.current); - } }; }, []); @@ -136,20 +132,14 @@ const ShareModal = ({ payload }) => { const handleShareOption = useCallback( async (option) => { if (option?.type === "qr") { - const qrTitleValue = qrTitle; - - const hidePromise = closeSheet(); - qrOpenTimeout.current = setTimeout(() => { - setGlobal({ - shareQrModal: { - visible: true, - url: qrUrl, - title: qrTitleValue, - }, - }); - }, 200); - - await hidePromise; + await closeSheet(); + setGlobal({ + shareQrModal: { + visible: true, + url: qrUrl, + title: qrTitle, + }, + }); return; }