We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48fa79c commit 1870aa4Copy full SHA for 1870aa4
frontend/app/room/[id]/page.tsx
@@ -31,7 +31,8 @@ function computePrayerBreaks(
31
const numPrayers = Math.floor(rakats / 2);
32
const numBreaks = numPrayers - 1; // no break after the very last prayer
33
if (numBreaks <= 0) return [];
34
- const netTime = Math.max(0, total - numBreaks * INTER_PRAYER_BREAK);
+ const netTime = total - numBreaks * INTER_PRAYER_BREAK;
35
+ if (netTime <= 0) return []; // total not yet reliable (< break time budget)
36
const timePerPrayer = netTime / numPrayers;
37
return Array.from({ length: numBreaks }, (_, k) => {
38
const start = (k + 1) * timePerPrayer + k * INTER_PRAYER_BREAK;
0 commit comments