From 949462001c1e4ac0dbe9855d29d53a5108cbfefd Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Sun, 25 Aug 2024 18:04:39 +0700 Subject: [PATCH] client: revert bad refactor --- .../SubmissionDetails/Programming/SubmissionDetails.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx b/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx index d3849f80b..e368efc20 100644 --- a/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx +++ b/judgels-client/src/components/SubmissionDetails/Programming/SubmissionDetails.jsx @@ -92,12 +92,10 @@ export function SubmissionDetails({ }; const renderScore = score => { - let formattedScore = score; - if (score.startsWith('*')) { - formattedScore = '✓' + score.substring(1); + return '✓' + score.substring(1); } else if (score.startsWith('X')) { - formattedScore = '✕' + score.substring(1); + return score.substring(1); } return score; };