From 611846dc4011d9ecfbed70e0aa7ea888bce532c7 Mon Sep 17 00:00:00 2001 From: Eunbi Kang Date: Mon, 25 Nov 2024 15:44:53 +0900 Subject: [PATCH] fix(fe): fix wrong testcase summary ui (#2239) --- .../TestcasePanel/TestcasePanel.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/frontend/app/(client)/(code-editor)/_components/TestcasePanel/TestcasePanel.tsx b/apps/frontend/app/(client)/(code-editor)/_components/TestcasePanel/TestcasePanel.tsx index a1eae46c0..b0e32452c 100644 --- a/apps/frontend/app/(client)/(code-editor)/_components/TestcasePanel/TestcasePanel.tsx +++ b/apps/frontend/app/(client)/(code-editor)/_components/TestcasePanel/TestcasePanel.tsx @@ -201,11 +201,11 @@ function TestSummary({ const notAcceptedTestcases = data .map((testcase) => - testcase.result !== 'Accepted' + testcase.result !== 'Accepted' && testcase.result !== 'Judging' ? `${testcase.isUserTestcase ? 'User' : 'Sample'} #${testcase.id}` - : -1 + : undefined ) - .filter((index) => index !== -1) + .filter(Boolean) return ( @@ -216,16 +216,16 @@ function TestSummary({ {acceptedCount}/{total} - {notAcceptedTestcases.length > 0 && ( - - - - - )} + + + +
- Wrong Testcase Number: - - {notAcceptedTestcases.join(', ')} -
+ Wrong Testcase Number: + + {notAcceptedTestcases.length > 0 + ? notAcceptedTestcases.join(', ') + : '-'} +
)