Skip to content

Commit d04b470

Browse files
committed
Refactor stickers section toggle logic
1 parent 8d09ce5 commit d04b470

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/routes/+page.svelte

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@
217217
});
218218
219219
$effect(() => {
220-
if (!showStickersSection || keyringInitialized || !keyringModel) {
220+
if (!showStickersSection) {
221+
return;
222+
}
223+
224+
if (keyringInitialized || !keyringModel) {
221225
return;
222226
}
223227
@@ -381,7 +385,10 @@
381385
<button
382386
class="button md fixed top-4 right-4 z-50 border-3 border-orange-900 bg-orange-800 outline-orange-50 transition-all hover:scale-105 hover:bg-orange-700 animate-[bounce_2.5s_ease-in-out_infinite]"
383387
style="transform: rotate(-2deg);"
384-
onclick={() => (showStickersSection = !showStickersSection)}
388+
onclick={() => {
389+
keyringInitialized = false;
390+
showStickersSection = !showStickersSection;
391+
}}
385392
>
386393
Free swag!
387394
</button>

0 commit comments

Comments
 (0)