Skip to content

Commit a88907a

Browse files
committed
Merge branch 'develop' of github.com:topcoder-platform/community-app into develop
2 parents 5f597b3 + 149dad7 commit a88907a

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

__tests__/shared/components/Header/__snapshots__/index.jsx.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ exports[`Default render 1`] = `
55
className="src-shared-components-Header-___style__nav-header-wrapper___3oH9J"
66
>
77
<TopNav
8-
isWipro={false}
98
loggedIn={true}
109
logo={
1110
<Logo
@@ -37,14 +36,12 @@ exports[`Default render 1`] = `
3736
"id": "myprofile",
3837
"logged": true,
3938
"title": "My Profile",
40-
"wipro_href": "https://topgear-app.wipro.com/user-details",
4139
},
4240
Object {
4341
"href": "https://community.topcoder-dev.com/PactsMemberServlet?module=PaymentHistory&full_list=false",
4442
"logged": true,
4543
"openNewTab": true,
4644
"title": "Payments",
47-
"wipro_href": "https://topgear-app.wipro.com/my_payments",
4845
},
4946
Object {
5047
"href": "/community/learn",

config/default.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,11 @@ module.exports = {
311311
id: 'myprofile',
312312
title: 'My Profile',
313313
href: '/members/willFilledByUserName',
314-
wipro_href: 'https://topgear-app.wipro.com/user-details',
315314
logged: true,
316315
},
317316
{
318317
title: 'Payments',
319318
href: 'https://community.topcoder-dev.com/PactsMemberServlet?module=PaymentHistory&full_list=false',
320-
wipro_href: 'https://topgear-app.wipro.com/my_payments',
321319
logged: true,
322320
openNewTab: true,
323321
},

package-lock.json

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

src/shared/components/Header/index.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ const Header = ({
104104
setOpenMore={handleChangeOpenMore}
105105
loggedIn={!_.isEmpty(profile)}
106106
profileHandle={profile ? profile.handle : ''}
107-
isWipro={(profile && profile.email && profile.email.includes('@wipro.com'))}
108107
tracking={tracking}
109108
/>
110109
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ class SubmissionsComponent extends React.Component {
906906
<p>
907907
{
908908
(!_.isEmpty(s.review) && !_.isEmpty(s.review[0]) && s.review[0].score)
909-
? s.review[0].score.toFixed(2)
909+
? Number(s.review[0].score).toFixed(2)
910910
: 'N/A'
911911
}
912912
</p>

src/shared/components/tc-communities/Header/index.jsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,28 @@ function Header(props) {
7272
}
7373

7474
let userSubMenu;
75+
7576
if (profile) {
77+
let profileLink = `${meta ? _.replace(BASE_URL, 'www', meta.subdomains[0]) : BASE_URL}/members/${normalizedProfile.handle}`;
78+
let paymentsLink = `${config.URL.COMMUNITY}/PactsMemberServlet?module=PaymentHistory&full_list=false`;
79+
80+
// Handle Wipro specific links (PS-257)
81+
if (profile && profile.email && profile.email.includes('@wipro.com')) {
82+
profileLink = 'https://topgear-app.wipro.com/user-details';
83+
paymentsLink = 'https://topgear-app.wipro.com/my_payments';
84+
}
85+
7686
userSubMenu = {
7787
title: 'User',
7888
items: [{
7989
enforceA: true,
8090
icon: <IconNavProfile />,
81-
link: `${meta ? _.replace(BASE_URL, 'www', meta.subdomains[0]) : BASE_URL}/members/${normalizedProfile.handle}`,
91+
link: profileLink,
8292
title: 'My Profile',
8393
}, {
8494
openNewTab: true,
8595
icon: <IconNavWallet />,
86-
link: `${config.URL.COMMUNITY}/PactsMemberServlet?module=PaymentHistory&full_list=false`,
96+
link: paymentsLink,
8797
title: 'Payments',
8898
}, {
8999
icon: <IconNavSettings />,
@@ -385,6 +395,7 @@ Header.propTypes = {
385395
photoURL: PT.string,
386396
groups: PT.any,
387397
handle: PT.string,
398+
email: PT.string,
388399
}),
389400
theme: PT.shape().isRequired,
390401
logoutRedirect: PT.string,

0 commit comments

Comments
 (0)