Skip to content

Commit

Permalink
Change floor to ceiling and reverse timer label
Browse files Browse the repository at this point in the history
  • Loading branch information
tingkai-mai committed Oct 20, 2024
1 parent e586597 commit 2ce7ffb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/app/(auth)/match/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ const showLoadingSpinner = (onCancel: () => void) => {
Swal.showLoading();
const timer = Swal.getPopup()!.querySelector("#timer");
setInterval(() => {
timer!.textContent = `${Math.floor(Swal.getTimerLeft() / 1000)}`;
timer!.textContent = `${
TIMEOUT_TIMER - Math.ceil(Swal.getTimerLeft() / 1000)
}`;
}, 100);
},
}).then((result) => {
Expand Down

0 comments on commit 2ce7ffb

Please sign in to comment.