Skip to content

Hotfix 2 - Smoke Testing 2020/11/12 - New forums #5192

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

Merged
merged 1 commit into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,21 @@ export default function ChallengeViewSelector(props) {
}
{ (() => {
if (hasRegistered || Boolean(roles.length)) {
if (_.isEmpty(discuss)) {
if (!_.isEmpty(discuss)) {
return (
discuss.map(d => (
<a
href={d.url}
styleName={getSelectorStyle(selectedView, DETAIL_TABS.CHALLENGE_FORUM)}
target="_blank"
rel="oopener noreferrer"
>
CHALLENGE DISCUSSION
</a>
))
);
}
if (forumId > 0) {
return (
<a
href={`${config.URL.FORUMS}${forumEndpoint}`}
Expand All @@ -190,18 +204,6 @@ export default function ChallengeViewSelector(props) {
</a>
);
}
return (
discuss.map(d => (
<a
href={d.url}
styleName={getSelectorStyle(selectedView, DETAIL_TABS.CHALLENGE_FORUM)}
target="_blank"
rel="oopener noreferrer"
>
CHALLENGE DISCUSSION
</a>
))
);
}
return '';
})()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,19 +322,21 @@ export default function SideBar({
pass screening.
</a>
</p>
<p styleName="link-like-paragraph">
Questions?
&zwnj;
{_.isEmpty(discuss) && (
<a
href={forumLink}
target="_blank"
rel="oopener noreferrer"
>
Ask in the Challenge Discussion Forums.
</a>
)}
</p>
{(forumLink || !_.isEmpty(discuss)) && (
<p styleName="link-like-paragraph">
Questions?
&zwnj;
{_.isEmpty(discuss) && (
<a
href={forumLink}
target="_blank"
rel="oopener noreferrer"
>
Ask in the Challenge Discussion Forums.
</a>
)}
</p>
)}
{!_.isEmpty(discuss) && (
<ul>
{ discuss.map(d => (
Expand Down
10 changes: 6 additions & 4 deletions src/shared/components/challenge-detail/Specification/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export default function ChallengeDetailsView(props) {
d.type === 'challenge' && !_.isEmpty(d.url)
));

let forumLink = track.toLowerCase() === 'design'
? `/?module=ThreadList&forumID=${forumId}`
: `/?module=Category&categoryID=${forumId}`;
forumLink = `${config.URL.FORUMS}${forumLink}`;
let forumLink = '';
if (forumId > 0) {
forumLink = track.toLowerCase() === 'design'
? `/?module=ThreadList&forumID=${forumId}`
: `/?module=Category&categoryID=${forumId}`;
}

let isWipro = false;
const wiproCommunity = communitiesList.find(x => x.communityId === 'wipro');
Expand Down