[TQRCode] deviceInfo가 없는경우

This commit is contained in:
고동영
2024-07-18 16:28:30 +09:00
parent c1e4dd1520
commit 8777a3cd7b

View File

@@ -45,6 +45,13 @@ export default function TQRCode({
height: scaleH(height),
correctLevel: window.QRCode.CorrectLevel.L,
});
} else if (typeof window === "object") {
const qrcode = new window.QRCode(qrcodeRef.current, {
text: `${text}`,
width: scaleW(width),
height: scaleH(height),
correctLevel: window.QRCode.CorrectLevel.L,
});
}
}, [text, deviceInfo]);
return <div aria-label={ariaLabel} ref={qrcodeRef} />;