From 549a1ea6d4644c40c8052e67bfe70c31e6604c3c Mon Sep 17 00:00:00 2001 From: yougotwill Date: Thu, 26 Sep 2024 11:56:10 +0200 Subject: [PATCH 1/2] fix: test if rosetta emulation needs more time to mount react to create a qr code --- ts/hooks/useIconToImageURL.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/hooks/useIconToImageURL.tsx b/ts/hooks/useIconToImageURL.tsx index b27a8c0864..27cf7da140 100644 --- a/ts/hooks/useIconToImageURL.tsx +++ b/ts/hooks/useIconToImageURL.tsx @@ -58,12 +58,12 @@ export const convertIconToImageURL = async ( /> ); // wait for it to render - await sleepFor(100); + await sleepFor(500); const svg = root?.querySelector(`#icon-to-image-url svg`); svg?.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); const svgString = svg?.outerHTML; - + window.log.debug(`WIP: [convertIconToImageUrl] svgString: ${svgString}`); reactRoot?.unmount(); root?.removeChild(divElement); From d472d6058926bd067506f84c3b3587bcc1ce7c5c Mon Sep 17 00:00:00 2001 From: yougotwill Date: Thu, 26 Sep 2024 12:13:01 +0200 Subject: [PATCH 2/2] fix: test with 200ms --- ts/hooks/useIconToImageURL.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ts/hooks/useIconToImageURL.tsx b/ts/hooks/useIconToImageURL.tsx index 27cf7da140..f451faba73 100644 --- a/ts/hooks/useIconToImageURL.tsx +++ b/ts/hooks/useIconToImageURL.tsx @@ -58,12 +58,11 @@ export const convertIconToImageURL = async ( /> ); // wait for it to render - await sleepFor(500); + await sleepFor(200); const svg = root?.querySelector(`#icon-to-image-url svg`); svg?.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); const svgString = svg?.outerHTML; - window.log.debug(`WIP: [convertIconToImageUrl] svgString: ${svgString}`); reactRoot?.unmount(); root?.removeChild(divElement);