Skip to content

Commit 84f938f

Browse files
committed
Remove 'register' button on challenge card in challenge listing (TOP-1550)
1 parent 6490c97 commit 84f938f

File tree

1 file changed

+6
-5
lines changed
  • src/shared/components/challenge-listing/ChallengeCard/Status

1 file changed

+6
-5
lines changed

src/shared/components/challenge-listing/ChallengeCard/Status/index.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export default function ChallengeStatus(props) {
6161
newChallengeDetails,
6262
selectChallengeDetailsTab,
6363
openChallengesInNewTabs,
64-
userId,
6564
isLoggedIn,
6665
} = props;
6766

@@ -242,9 +241,13 @@ export default function ChallengeStatus(props) {
242241
if (statusPhase) phaseMessage = statusPhase.name;
243242
else if (status === 'Draft') phaseMessage = DRAFT_MSG;
244243

245-
const users = challenge.users || {};
244+
const showRegisterInfo = false;
246245

247-
const showRegisterInfo = (challenge.currentPhaseNames || []).includes('Registration') && !users[userId];
246+
// NOTE: the commented code below can be used to turn the "Register" button
247+
// back on from the challenge listing page, if we ever want that again.
248+
// This was turned off (set to always false above) via a change request in TOP-1549
249+
// const showRegisterInfo = (challenge.currentPhaseNames || [])
250+
// .includes('Registration') && !users[userId];
248251

249252
return (
250253
<div styleName={showRegisterInfo ? 'challenge-progress with-register-button' : 'challenge-progress'}>
@@ -316,7 +319,6 @@ ChallengeStatus.defaultProps = {
316319
detailLink: '',
317320
openChallengesInNewTabs: false,
318321
className: '',
319-
userId: '',
320322
};
321323

322324
ChallengeStatus.propTypes = {
@@ -327,6 +329,5 @@ ChallengeStatus.propTypes = {
327329
openChallengesInNewTabs: PT.bool, // eslint-disable-line react/no-unused-prop-types
328330
selectChallengeDetailsTab: PT.func.isRequired,
329331
className: PT.string,
330-
userId: PT.number,
331332
isLoggedIn: PT.bool.isRequired,
332333
};

0 commit comments

Comments
 (0)