-
Notifications
You must be signed in to change notification settings - Fork 210
[PROD RELEASE] - Updates & fixes #7179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cc2f998
e841931
357800f
1a64664
bf2fe67
fadc5f2
4803526
3f359be
3f18f70
03c1b53
0fbfa7e
d708cda
43d387c
734fbd3
3957f2a
0330f00
5a0cdd1
c3cd1a3
e08aaea
90ddb39
7ad0041
da9826b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| */ | ||
| import React from 'react'; | ||
| import PT from 'prop-types'; | ||
| import MarkdownRenderer from 'components/MarkdownRenderer'; | ||
|
|
||
| import './styles.scss'; | ||
|
|
||
|
|
@@ -19,13 +20,10 @@ const ChallengeSpecTab = ({ challenge }) => ( | |
| Challenge Overview | ||
| </h2> | ||
| <div | ||
| /* eslint-disable react/no-danger */ | ||
| dangerouslySetInnerHTML={{ | ||
| __html: challenge.description, | ||
| }} | ||
| /* eslint-enable react/no-danger */ | ||
| styleName="rawHtml" | ||
| /> | ||
| > | ||
| <MarkdownRenderer markdown={challenge.description} /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| </div> | ||
| </article> | ||
| ) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ export default function Submission(props) { | |
| } = props; | ||
| const formatDate = date => moment(+new Date(date)).format('MMM DD, YYYY hh:mm A'); | ||
| const onDownloadSubmission = onDownload.bind(1, submissionObject.id); | ||
| const safeForDownloadCheck = safeForDownload(submissionObject.url); | ||
| const safeForDownloadCheck = safeForDownload(submissionObject); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| const onDownloadArtifacts = onOpenDownloadArtifactsModal.bind(1, submissionObject.id); | ||
| const onOpenRatingsList = onOpenRatingsListModal.bind(1, submissionObject.id); | ||
| const onOpenReviewApp = () => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ export default function SubmissionHistoryRow({ | |
| finalScore, | ||
| provisionalScore, | ||
| submissionTime, | ||
| createdAt, | ||
| isReviewPhaseComplete, | ||
| status, | ||
| challengeStatus, | ||
|
|
@@ -42,9 +43,11 @@ export default function SubmissionHistoryRow({ | |
| }; | ||
| const provisionalScoreValue = parseScore(provisionalScore); | ||
| const finalScoreValue = parseScore(finalScore); | ||
| const submissionMoment = submissionTime ? moment(submissionTime) : null; | ||
|
|
||
| const timeField = isMM ? submissionTime : createdAt; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| const submissionMoment = timeField ? moment(timeField) : null; | ||
| const submissionTimeDisplay = submissionMoment | ||
| ? `${submissionMoment.format('DD MMM YYYY')} ${submissionMoment.format('HH:mm:ss')}` | ||
| ? submissionMoment.format('MMM DD, YYYY HH:mm') | ||
| : 'N/A'; | ||
| const getInitialReviewResult = () => { | ||
| if (status === 'failed') return <FailedSubmissionTooltip />; | ||
|
|
@@ -85,13 +88,17 @@ export default function SubmissionHistoryRow({ | |
| {getFinalScore()} | ||
| </div> | ||
| </div> | ||
| <div styleName="col-3 col"> | ||
| <div styleName="mobile-header">PROVISIONAL SCORE</div> | ||
| <div> | ||
| {getInitialReviewResult()} | ||
| </div> | ||
| </div> | ||
| <div styleName={`col-4 col ${isMM ? 'mm' : ''}`}> | ||
| { | ||
| isMM && ( | ||
| <div styleName="col-3 col"> | ||
| <div styleName="mobile-header">PROVISIONAL SCORE</div> | ||
| <div> | ||
| {getInitialReviewResult()} | ||
| </div> | ||
| </div> | ||
| ) | ||
| } | ||
| <div styleName={`${isMM ? 'col-4' : 'col-3'} col ${isMM ? 'mm' : ''}`}> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| <div styleName="mobile-header">TIME</div> | ||
| <div> | ||
| {submissionTimeDisplay} | ||
|
|
@@ -134,6 +141,8 @@ SubmissionHistoryRow.defaultProps = { | |
| provisionalScore: null, | ||
| isReviewPhaseComplete: false, | ||
| isLoggedIn: false, | ||
| createdAt: null, | ||
| submissionTime: null, | ||
| }; | ||
|
|
||
| SubmissionHistoryRow.propTypes = { | ||
|
|
@@ -154,7 +163,11 @@ SubmissionHistoryRow.propTypes = { | |
| submissionTime: PT.oneOfType([ | ||
| PT.string, | ||
| PT.oneOf([null]), | ||
| ]).isRequired, | ||
| ]), | ||
| createdAt: PT.oneOfType([ | ||
| PT.string, | ||
| PT.oneOf([null]), | ||
| ]), | ||
| challengeStatus: PT.string.isRequired, | ||
| isReviewPhaseComplete: PT.bool, | ||
| auth: PT.shape().isRequired, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
correctness]The
prizeTypeis determined by the first element ofplacementPrizes. IfplacementPrizescontains mixed types, this logic might not accurately reflect the prize type. Consider verifying that all prizes are of the same type or adjusting the logic to handle mixed types appropriately.