diff --git a/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx b/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx index f07020aa0..69d161f79 100644 --- a/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx +++ b/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx @@ -91,6 +91,16 @@ export function SubmissionDetails({ ); }; + const renderScore = score => { + if (score.startsWith('*')) { + return '✓' + score.substring(1); + } + if (score.startsWith('X')) { + return '✕' + score.substring(1); + } + return score; + }; + const renderSubtaskResults = () => { if (!hasSubtasks) { return null; @@ -136,7 +146,7 @@ export function SubmissionDetails({ {renderExecutionTime(testCaseResult)} {renderExecutionMemory(testCaseResult)} - {testCaseResult.score} + {renderScore(testCaseResult.score)} ); }) @@ -200,7 +210,7 @@ export function SubmissionDetails({ {renderExecutionTime(result)} {renderExecutionMemory(result)} - {result.score} + {renderScore(result.score)} ))} @@ -257,7 +267,7 @@ export function SubmissionDetails({ {renderExecutionTime(result)} {renderExecutionMemory(result)} - {result.score} + {renderScore(result.score)} )); })}