bugfix since for live chat feed

This commit is contained in:
2023-07-15 16:27:44 +01:00
parent 63873e2ac7
commit a1605e31d5
2 changed files with 7 additions and 4 deletions

View File

@ -32,7 +32,7 @@ export function Goal({
.reduce((acc, z) => acc + z.amount, 0);
}, [zaps]);
const progress = (soFar / goalAmount) * 100;
const progress = Math.max(0, Math.min(100, (soFar / goalAmount) * 100));
const isFinished = progress >= 100;
const previousValue = usePreviousValue(isFinished);