From 53b35c5b13797ea59bec850447fd347214fef025 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 1 Aug 2022 12:27:49 -0700 Subject: use canvas for qr code --- src/routes/invoice/[id].svelte | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/routes/invoice') diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte index d5a39daa..1f1a7aa3 100644 --- a/src/routes/invoice/[id].svelte +++ b/src/routes/invoice/[id].svelte @@ -67,10 +67,10 @@ let init = async (ready) => { if (!ready) return; let { default: QRCodeStyling } = await import('qr-code-styling'); - console.log('text', text); + const qrCode = new QRCodeStyling({ width: window.screen.width < 640 ? 250 : 300, - type: 'svg', + type: 'canvas', data: text, image: '/images/invoice.svg', backgroundOptions: { @@ -102,9 +102,6 @@ }; let customInput; - - let qrSkeleton = true; - setTimeout(() => (qrSkeleton = false), 1000); {#if $user} @@ -227,13 +224,7 @@ class="border {showMobileTip ? 'border-gray-400' : 'border-lightgrey'} rounded-3xl block md:flex md:p-5 justify-center items-center h-[300px] md:h-[342px] w-[250px] md:w-[342px] relative" - > -
-
+ />
-- cgit v1.2.3