qr code modal

This commit is contained in:
2025-10-03 15:27:47 +02:00
parent 2b6bf7e433
commit 6a6c3ddb8b
+8 -18
View File
@@ -45,7 +45,6 @@ const ShareModal = ({ payload }) => {
const [copied, setCopied] = useState(false); const [copied, setCopied] = useState(false);
const copyTimeout = useRef(null); const copyTimeout = useRef(null);
const qrOpenTimeout = useRef(null);
const blurProps = const blurProps =
Platform.OS === "android" Platform.OS === "android"
? { experimentalBlurMethod: "dimezisBlurView" } ? { experimentalBlurMethod: "dimezisBlurView" }
@@ -70,9 +69,6 @@ const ShareModal = ({ payload }) => {
if (copyTimeout.current) { if (copyTimeout.current) {
clearTimeout(copyTimeout.current); clearTimeout(copyTimeout.current);
} }
if (qrOpenTimeout.current) {
clearTimeout(qrOpenTimeout.current);
}
}; };
}, []); }, []);
@@ -136,20 +132,14 @@ const ShareModal = ({ payload }) => {
const handleShareOption = useCallback( const handleShareOption = useCallback(
async (option) => { async (option) => {
if (option?.type === "qr") { if (option?.type === "qr") {
const qrTitleValue = qrTitle; await closeSheet();
setGlobal({
const hidePromise = closeSheet(); shareQrModal: {
qrOpenTimeout.current = setTimeout(() => { visible: true,
setGlobal({ url: qrUrl,
shareQrModal: { title: qrTitle,
visible: true, },
url: qrUrl, });
title: qrTitleValue,
},
});
}, 200);
await hidePromise;
return; return;
} }