diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a24c6244f..23b1d90989 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -244,7 +244,7 @@ workflows: filters: branches: only: - - issue-5041 + - free # This is beta env for production soft releases - "build-prod-beta": context : org-global diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx index 98df8985c4..0445677aa7 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -36,6 +36,9 @@ export default function ChallengeViewSelector(props) { const numOfSub = numOfSubmissions + (numOfCheckpointSubmissions || 0); const forumId = _.get(challenge, 'legacy.forumId') || 0; + const discuss = _.get(challenge, 'discussions', []).filter(d => ( + d.type === 'challenge' && !_.isEmpty(d.url) + )); const roles = _.get(challenge, 'userDetails.roles') || []; const isDesign = trackLower === 'design'; @@ -173,16 +176,37 @@ export default function ChallengeViewSelector(props) { ) : null } - { (hasRegistered || Boolean(roles.length)) - && ( - - CHALLENGE FORUM - - ) - } + { (() => { + if (hasRegistered || Boolean(roles.length)) { + if (!_.isEmpty(discuss)) { + return ( + discuss.map(d => ( + + CHALLENGE DISCUSSION + + )) + ); + } + if (forumId > 0) { + return ( + + CHALLENGE FORUM + + ); + } + } + return ''; + })()} ); diff --git a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx index 5b4fe7aa2c..793278de7d 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx +++ b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx @@ -21,6 +21,7 @@ export default function SideBar({ eventDetail, shareable, forumLink, + discuss, hasRegistered, reviewType, isDesign, @@ -321,13 +322,36 @@ export default function SideBar({ pass screening.
-- Questions? - - - Ask in the Challenge Discussion Forums. - -
+ {(forumLink || !_.isEmpty(discuss)) && ( ++ Questions? + + {_.isEmpty(discuss) && ( + + Ask in the Challenge Discussion Forums. + + )} +
+ )} + {!_.isEmpty(discuss) && ( +