From 7801ce67ace77f5de98ddc38d7b0b45c68faeb6b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 3 Dec 2024 15:57:40 -0800 Subject: cache qrs --- src/routes/(app)/qr/[text]/+page.server.ts | 7 +------ src/routes/(app)/qr/[text]/+page.svelte | 4 ++-- src/routes/(app)/qr/[text]/raw/+server.ts | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 src/routes/(app)/qr/[text]/raw/+server.ts (limited to 'src/routes/(app)/qr') diff --git a/src/routes/(app)/qr/[text]/+page.server.ts b/src/routes/(app)/qr/[text]/+page.server.ts index 09e7593f..5a9debb3 100644 --- a/src/routes/(app)/qr/[text]/+page.server.ts +++ b/src/routes/(app)/qr/[text]/+page.server.ts @@ -1,8 +1,3 @@ -import Qr from "qrcode-base64"; - export async function load({ params }) { - const { text } = params; - const src = Qr.drawImg(text, { size: 600 }); - - return { src, text }; + return params; } diff --git a/src/routes/(app)/qr/[text]/+page.svelte b/src/routes/(app)/qr/[text]/+page.svelte index 02a5b718..46420743 100644 --- a/src/routes/(app)/qr/[text]/+page.svelte +++ b/src/routes/(app)/qr/[text]/+page.svelte @@ -3,11 +3,11 @@ import Qr from "$comp/Qr.svelte"; import { back, copy } from "$lib/utils"; let { data } = $props(); - let { src, text } = data; + let { text } = data;
- +