From ebf51e325738d7a9a95f379b6f25d1e424e78392 Mon Sep 17 00:00:00 2001 From: lyonsyonii Date: Thu, 4 Jul 2024 22:49:28 +0200 Subject: [PATCH] fix: Progress bar behaving wrongly when value is 0 --- frontend/src/components/Progress.astro | 2 +- frontend/src/utils/confetti.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Progress.astro b/frontend/src/components/Progress.astro index 3b42362..00cd0d0 100644 --- a/frontend/src/components/Progress.astro +++ b/frontend/src/components/Progress.astro @@ -17,7 +17,7 @@ const { id, total, confetti = true } = Astro.props; - + diff --git a/frontend/src/utils/confetti.ts b/frontend/src/utils/confetti.ts index ea99296..2366d4d 100644 --- a/frontend/src/utils/confetti.ts +++ b/frontend/src/utils/confetti.ts @@ -1,7 +1,8 @@ +const confettis = await import("confettis"); + export async function confetti({ - y = 2, + y = 1, count = 100, }: { y?: number; count?: number } = {}) { - const confettis = await import("confettis"); confettis.create({ y, count }); }