diff --git a/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx b/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx index e368efc20..e82d54ca8 100644 --- a/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx +++ b/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx @@ -92,11 +92,27 @@ export function SubmissionDetails({ }; const renderScore = score => { + let formattedScore = score; + if (score.startsWith('*')) { - return '✓' + score.substring(1); + formattedScore = '✓' + score.substring(1); } else if (score.startsWith('X')) { - return score.substring(1); + formattedScore = score.substring(1); } + + if (formattedScore.includes(' [')) { + const [points, feedback] = formattedScore.split(' [', 2); + return ( + <> + {points}{' '} + + {'['} + {feedback} + + + ); + } + return score; };