Skip to content

Commit 9c68d0f

Browse files
authored
Merge pull request #6976 from topcoder-platform/develop
PROD - deploy PS-257, conditional links for Wipro users in the old header
2 parents ab8608d + f0730eb commit 9c68d0f

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/shared/components/Header/index.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ Header.propTypes = {
123123
profile: PT.shape({
124124
photoURL: PT.string,
125125
handle: PT.string,
126+
email: PT.string,
126127
}),
127128
auth: PT.shape(),
128129
notifications: PT.arrayOf(PT.object).isRequired,

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

+13-2
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)