From 2ce7ffb2c4863e0888bcce62d77738ab4571a265 Mon Sep 17 00:00:00 2001 From: Mai Ting Kai Date: Sun, 20 Oct 2024 19:34:45 +0800 Subject: [PATCH] Change floor to ceiling and reverse timer label --- frontend/src/app/(auth)/match/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/(auth)/match/page.tsx b/frontend/src/app/(auth)/match/page.tsx index 0644cb77cd..cc435e567d 100644 --- a/frontend/src/app/(auth)/match/page.tsx +++ b/frontend/src/app/(auth)/match/page.tsx @@ -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) => {