Skip to content

Commit

Permalink
fix(fe): fix wrong testcase summary ui (#2239)
Browse files Browse the repository at this point in the history
  • Loading branch information
eunnbi authored Nov 25, 2024
1 parent 6ab60c7 commit 611846d
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<table className="min-w-full">
Expand All @@ -216,16 +216,16 @@ function TestSummary({
{acceptedCount}/{total}
</td>
</tr>
{notAcceptedTestcases.length > 0 && (
<tr>
<td className="w-52 py-1 align-top text-slate-400">
Wrong Testcase Number:
</td>
<td className="py-1 text-white">
{notAcceptedTestcases.join(', ')}
</td>
</tr>
)}
<tr>
<td className="w-52 py-1 align-top text-slate-400">
Wrong Testcase Number:
</td>
<td className="py-1 text-white">
{notAcceptedTestcases.length > 0
? notAcceptedTestcases.join(', ')
: '-'}
</td>
</tr>
</tbody>
</table>
)
Expand Down

0 comments on commit 611846d

Please sign in to comment.