Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit de48d0b

Browse files
authored
Merge pull request #151 from topcoder-platform/dev
10/30/2023 PROD Release - Turns off TaaS app, Tass Admin, Onboarding, old profiles, Self Service
2 parents f382956 + e7b8ffe commit de48d0b

File tree

8 files changed

+15
-89
lines changed

8 files changed

+15
-89
lines changed

config/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
PLATFORM_DOMAIN: "https://platform.topcoder-dev.com",
99
TAAS_APP: "https://platform.topcoder-dev.com/taas/myteams",
1010
PLATFORM_UI: "https://platform-ui.topcoder-dev.com",
11+
PLATFORM_PROFILES_URL: "https://profiles.topcoder-dev.com",
1112
},
1213
API: {
1314
V3: "https://api.topcoder-dev.com/v3",

config/prod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
PLATFORM_DOMAIN: "https://platform.topcoder.com",
99
TAAS_APP: "https://platform.topcoder.com/taas/myteams",
1010
PLATFORM_UI: "https://platform-ui.topcoder.com",
11+
PLATFORM_PROFILES_URL: "https://profiles.topcoder.com",
1112
},
1213
API: {
1314
V3: "https://api.topcoder.com/v3",

config/qa.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
PLATFORM_DOMAIN: "https://platform.topcoder-qa.com",
99
TAAS_APP: "https://platform.topcoder-qa.com/taas/myteams",
1010
PLATFORM_UI: "https://platform-ui.topcoder-qa.com",
11+
PLATFORM_PROFILES_URL: "https://profiles.topcoder.com",
1112
},
1213
API: {
1314
V3: "https://api.topcoder-qa.com/v3",

src/App.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ const App = () => {
6363
<NavBar
6464
default
6565
noThrow
66-
profileUrl={`/profile/${_.get(auth, "profile.handle", "")}`}
6766
hideSwitchTools={isNavigationDisabled}
6867
path="/*"
6968
/>

src/components/NavBar/index.jsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import "./styles.css";
2424
import { useMediaQuery } from "react-responsive";
2525
import NotificationsMenu from "../NotificationsMenu";
2626

27-
const NavBar = ({ hideSwitchTools, profileUrl }) => {
27+
const NavBar = ({ hideSwitchTools }) => {
2828

2929
// all menu options
3030
const menu = useSelector((state) => state.menu.categories);
@@ -81,11 +81,7 @@ const NavBar = ({ hideSwitchTools, profileUrl }) => {
8181
const renderProfile = (
8282
<>
8383
<NotificationsMenu />
84-
<UserMenu
85-
profileUrl={profileUrl}
86-
profile={auth.profile}
87-
hideSwitchTools={hideSwitchTools}
88-
/>
84+
<UserMenu profile={auth.profile} hideSwitchTools={hideSwitchTools} />
8985
</>
9086
)
9187

@@ -145,11 +141,9 @@ const NavBar = ({ hideSwitchTools, profileUrl }) => {
145141

146142
NavBar.defaultProps = {
147143
hideSwitchTools: false,
148-
profileUrl: '/profile/',
149144
};
150145

151146
NavBar.propTypes = {
152-
profileUrl: PropTypes.string,
153147
hideSwitchTools: PropTypes.boolean,
154148
};
155149

src/components/UserMenu/index.jsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
* Shows logged-in user with user menu with options like log-out.
55
*/
66
import React, { useState, useCallback, Fragment } from "react";
7-
import { Link } from "@reach/router";
8-
import PropTypes from "prop-types";
97
import Avatar from "../Avatar";
108
import cn from "classnames";
119
import OutsideClickHandler from "react-outside-click-handler";
12-
import { logout, getLogoutUrl } from "../../utils";
10+
import { logout, getLogoutUrl, getProfileUrl } from "../../utils";
1311
import "./styles.css";
1412
import { useMediaQuery } from "react-responsive";
1513

16-
const UserMenu = ({ profile, profileUrl }) => {
14+
const UserMenu = ({ profile }) => {
1715
const [isOpenMenu, setIsOpenMenu] = useState(false);
1816

1917
const closeMenu = useCallback(() => {
@@ -65,12 +63,9 @@ const UserMenu = ({ profile, profileUrl }) => {
6563
<div className="user-menu-popover-content">
6664
<ul className="user-menu-list">
6765
<li>
68-
<Link
69-
to={`${profileUrl}`}
70-
onClick={closeMenu}
71-
>
66+
<a href={getProfileUrl(profile.handle)} onClick={closeMenu}>
7267
Profile
73-
</Link>
68+
</a>
7469
</li>
7570
<li>
7671
<a href={getLogoutUrl()} onClick={onLogoutClick}>
@@ -87,12 +82,4 @@ const UserMenu = ({ profile, profileUrl }) => {
8782
);
8883
};
8984

90-
UserMenu.defaultProps = {
91-
profileUrl: '/profile',
92-
};
93-
94-
UserMenu.propTypes = {
95-
profileUrl: PropTypes.string,
96-
};
97-
9885
export default UserMenu;

src/constants/apps.js

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,6 @@ export const APP_CATEGORIES = [
1818
{
1919
category: "Manage",
2020
apps: [
21-
{
22-
title: "TaaS",
23-
icon: appTaasIcon,
24-
path: "/taas",
25-
menu: [
26-
{
27-
title: "My Teams",
28-
path: "/taas/myteams",
29-
icon: myteamsIcon,
30-
activeIcon: myteamsGreenIcon,
31-
isExact: false,
32-
},
33-
{
34-
title: "Create New Team",
35-
path: "/taas/createnewteam",
36-
icon: createTeamIcon,
37-
activeIcon: createTeamGreenIcon,
38-
isExact: false,
39-
},
40-
],
41-
},
42-
{
43-
title: "TaaS Admin",
44-
icon: appTaasAdminIcon,
45-
path: "/taas-admin",
46-
menu: [],
47-
roles: ["bookingmanager", "administrator"],
48-
},
4921
{
5022
title: "Documentation",
5123
icon: appDocumentationIcon,
@@ -61,17 +33,6 @@ export const APP_CATEGORIES = [
6133
},
6234
],
6335
},
64-
{
65-
category: "Work",
66-
apps: [
67-
{
68-
title: "Self Service",
69-
icon: earnIcon,
70-
link: `${config.URL.PLATFORM_UI}/work/dashboard`,
71-
menu: [],
72-
},
73-
],
74-
},
7536
{
7637
category: "Do",
7738
apps: [
@@ -83,28 +44,4 @@ export const APP_CATEGORIES = [
8344
},
8445
],
8546
},
86-
{
87-
category: "Profile",
88-
hidden: true,
89-
apps: [
90-
{
91-
title: "Profile App",
92-
path: "/profile/",
93-
isExact: false,
94-
menu: [],
95-
},
96-
],
97-
},
98-
{
99-
category: "Onboard",
100-
hidden: true,
101-
apps: [
102-
{
103-
title: "Member Onboarding",
104-
path: "/onboard",
105-
isExact: false,
106-
menu: [],
107-
},
108-
],
109-
},
11047
];

src/utils/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ export const getLogoutUrl = () =>
1111
"https://" + window.location.host
1212
)}`;
1313

14+
/**
15+
* Generate Profiles URL
16+
*/
17+
export const getProfileUrl = (handle) =>
18+
`${config.URL.PLATFORM_PROFILES_URL}/${handle}`;
19+
1420
/**
1521
* Generate Login URL
1622
*/

0 commit comments

Comments
 (0)