diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index edf30fa..cf7ae60 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -36,7 +36,9 @@ await event.publish(); console.log("event id", event.id) $questionId = event.id; - $qrCodeUrl = await QRCode.toDataURL(`${window.location.origin}/q/${$questionId}`); + $qrCodeUrl = await QRCode.toDataURL(`${window.location.origin}/q/${$questionId}`, { + width: 800, + }); } function startTimer() { @@ -55,6 +57,8 @@ if ($ndkReady) { if ($ndk.activeUser) { console.log('User:', $user); + } else { + login(); } } }); @@ -128,11 +132,6 @@ -webkit-appearance: none; margin: 0; } - :root { - display: grid; - place-items: center; /* shorthand for both horizontal and vertical centering */ - height: 100%; - } .qr-share img { width: 100%; border: 3px solid #eee; @@ -145,6 +144,7 @@ display: flex; margin: 0 auto; max-width: 250px; + border-radius: 50%; } .main-layout { margin: auto; diff --git a/src/routes/q/[id]/+page.svelte b/src/routes/q/[id]/+page.svelte index 72ed397..ecf3017 100644 --- a/src/routes/q/[id]/+page.svelte +++ b/src/routes/q/[id]/+page.svelte @@ -18,10 +18,10 @@ let comment = ''; let comments = writable([]); - let question = writable(''); $effect(() => { if ($ndkReady) { + console.log('ndk ready'); const sub = $ndk.subscribe({ kinds: [2222], '#E': [data.id] }); sub.on('event', (event) => { $comments = [...$comments, event]; @@ -31,16 +31,16 @@ }); -