[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 03/04: fix: use QR images
From: |
gnunet |
Subject: |
[taler-wallet-core] 03/04: fix: use QR images |
Date: |
Sun, 11 Aug 2024 19:34:07 +0200 |
This is an automated email from the git hooks/post-receive script.
nora-grothoff pushed a commit to branch master
in repository wallet-core.
commit e0e4fb390f6dbf5267169d7a993c7c21f200dea2
Author: Nullptrderef <nullptrderef@proton.me>
AuthorDate: Sun Aug 11 19:33:19 2024 +0200
fix: use QR images
---
packages/merchant-backoffice-ui/src/components/exception/QR.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/merchant-backoffice-ui/src/components/exception/QR.tsx
b/packages/merchant-backoffice-ui/src/components/exception/QR.tsx
index 246ce0229..029a87879 100644
--- a/packages/merchant-backoffice-ui/src/components/exception/QR.tsx
+++ b/packages/merchant-backoffice-ui/src/components/exception/QR.tsx
@@ -25,9 +25,13 @@ export function QR({ text }: { text: string }): VNode {
qr.addData(text);
qr.make();
if (divRef.current) {
- divRef.current.innerHTML = qr.createSvgTag({
+ const image = qr.createSvgTag({
scalable: true,
});
+ const imageURL = `data:image/svg+xml,${encodeURIComponent(image)}`;
+ divRef.current.innerHTML = `<img src=${JSON.stringify(
+ imageURL,
+ )} alt=${JSON.stringify(`QR Code containing the data ${text}`)} />`;
}
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.