Skip to content

Commit 1463007

Browse files
authored
Merge pull request #4669 from cagdas001/integration-v5-challenge-api
feat(challenge-detail): add legacy challenge id
2 parents 2b019ba + 93674aa commit 1463007

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/shared/components/challenge-detail/Specification/SideBar/index.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import styles from './styles.scss';
1616

1717
export default function SideBar({
1818
challengesUrl,
19+
legacyId,
1920
documents,
2021
eventDetail,
2122
shareable,
@@ -338,6 +339,11 @@ export default function SideBar({
338339
<ShareSocial />
339340
</div>
340341
)}
342+
{ legacyId && (
343+
<div styleName="legacy-challenge-id">
344+
<h3>ID: {legacyId}</h3>
345+
</div>
346+
)}
341347
</div>
342348
</div>
343349
);
@@ -357,10 +363,12 @@ SideBar.defaultProps = {
357363
metadata: {},
358364
reviewScorecardId: '',
359365
screeningScorecardId: '',
366+
legacyId: '',
360367
};
361368

362369
SideBar.propTypes = {
363370
challengesUrl: PT.string.isRequired,
371+
legacyId: PT.string,
364372
eventDetail: PT.shape({
365373
eventName: PT.string.isRequired,
366374
description: PT.string.isRequired,

src/shared/components/challenge-detail/Specification/SideBar/styles.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@
117117
@include linkLikeParagraph;
118118
}
119119

120+
.legacy-challenge-id {
121+
h3 {
122+
color: $tc-gray-10;
123+
font-style: italic;
124+
}
125+
126+
text-align: right;
127+
}
128+
120129
ol {
121130
@include roboto-regular;
122131

src/shared/components/challenge-detail/Specification/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export default function ChallengeDetailsView(props) {
4343
privateDescription,
4444
descriptionFormat,
4545
legacy,
46+
legacyId,
4647
documents,
4748
finalSubmissionGuidelines,
4849
userDetails,
@@ -365,6 +366,7 @@ export default function ChallengeDetailsView(props) {
365366
</div>
366367
<SideBar
367368
challengesUrl={challengesUrl}
369+
legacyId={legacyId}
368370
forumLink={forumLink}
369371
documents={documents}
370372
hasRegistered={hasRegistered}
@@ -421,6 +423,7 @@ ChallengeDetailsView.propTypes = {
421423
screeningScorecardId: PT.string,
422424
forumId: PT.number,
423425
}),
426+
legacyId: PT.string,
424427
groups: PT.any,
425428
reviewType: PT.string,
426429
tags: PT.arrayOf(PT.string),

0 commit comments

Comments
 (0)