From 2459779ee4e7be7ce6478b7d75af124fff11db61 Mon Sep 17 00:00:00 2001 From: Brendan Tan Date: Sat, 19 Oct 2024 15:00:05 +0800 Subject: [PATCH] Add disabled buttons during matching --- frontend/app/(authenticated)/questions/page.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/app/(authenticated)/questions/page.tsx b/frontend/app/(authenticated)/questions/page.tsx index 18f3a039c0..c4bb82bb9b 100644 --- a/frontend/app/(authenticated)/questions/page.tsx +++ b/frontend/app/(authenticated)/questions/page.tsx @@ -244,7 +244,7 @@ export default function Questions() { if (prevTime >= 32) { // we use 32 so there is buffer clearInterval(matchTimerRef.current as NodeJS.Timeout); setMatchFailDialogOpen(true); - // setMatchFoundDialogOpen(true); use this to open match found dialog + // setMatchFoundDialogOpen(true); // use this to open match found dialog return 32; } return prevTime + 1; @@ -346,6 +346,7 @@ export default function Questions() { variant="outline" className="uppercase rounded-3xl" onClick={handleSelectAll} + disabled={isMatching} > {isSelectAll ? "Remove all" : "Add all"} @@ -392,8 +393,9 @@ export default function Questions() {