From a90f0f8653b3ade5821c34162f8f18c996c57afa Mon Sep 17 00:00:00 2001 From: prasadgkalamkar Date: Thu, 19 Dec 2024 16:53:12 +0530 Subject: [PATCH] fix: Added fix for qr code download link mismatch data type (#837) * org did not foud issue resolved in issuance flow Signed-off-by: prasadgkalamkar * Removed unwanted files Signed-off-by: prasadgkalamkar * Added fix for qr code download link mismatch data type Signed-off-by: prasadgkalamkar --------- Signed-off-by: prasadgkalamkar --- src/commonComponents/QRcode.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commonComponents/QRcode.tsx b/src/commonComponents/QRcode.tsx index 4d51e1099..3bf1864d4 100644 --- a/src/commonComponents/QRcode.tsx +++ b/src/commonComponents/QRcode.tsx @@ -4,7 +4,8 @@ import domtoimage from 'dom-to-image'; const CustomQRCode = ({ value, size }: { value: string, size: number }) => { - const inputRef = useRef(null); + const node = document.createTextNode(''); + const inputRef = useRef(node); const [isCopied, setIsCopied] = useState(false); function copyTextVal(e: React.MouseEvent) { @@ -24,7 +25,7 @@ const CustomQRCode = ({ value, size }: { value: string, size: number }) => { } const drawHtmlToCanvas = () => { - domtoimage.toJpeg(inputRef.current, { quality: 0.95 }) + domtoimage.toJpeg(inputRef.current, { quality: 0.95 }) .then(function (dataUrl) { var link = document.createElement('a'); link.download = 'my-image-name.jpeg';