Skip to content

Commit

Permalink
fix: Progress bar behaving wrongly when value is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
LyonSyonII committed Jul 4, 2024
1 parent 7132a10 commit ebf51e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Progress.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { id, total, confetti = true } = Astro.props;

<x-progress data-confetti={`${confetti}`}>
<label for={id}>0 / {total}</label>
<progress {id} max={total}></progress>
<progress {id} value={0} max={total}></progress>

<button class="feedback">Give Feedback</button>
<Feedback id={id} />
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/utils/confetti.ts
Original file line number Diff line number Diff line change
@@ -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 });
}

0 comments on commit ebf51e3

Please sign in to comment.