Skip to content

Commit f62d276

Browse files
PROD-1558 add account settings page #time 15m
1 parent 0eae43f commit f62d276

File tree

129 files changed

+3521
-741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+3521
-741
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
rootDir: "src",
2+
rootDir: "src-ts",
33
transform: {
44
"^.+\\.(j|t)sx?$": "babel-jest",
55
},

package.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,27 @@
1010
"format": "prettier --write \"./**\"",
1111
"test": "cross-env BABEL_ENV=test jest",
1212
"watch-tests": "cross-env BABEL_ENV=test jest --watch",
13-
"coverage": "cross-env BABEL_ENV=test jest --coverage"
13+
"coverage": "cross-env BABEL_ENV=test jest --coverage",
14+
"bsouza": "sh start-bsouza.sh",
15+
"tslint": "tslint 'src-ts/**/*.{ts,tsx}'",
16+
"tslint:fix": "tslint 'src-ts/**/*.{ts,tsx}' --fix"
1417
},
1518
"devDependencies": {
1619
"@babel/core": "^7.7.5",
1720
"@babel/plugin-transform-runtime": "^7.8.3",
1821
"@babel/preset-env": "^7.7.6",
1922
"@babel/preset-react": "^7.7.4",
23+
"@babel/preset-typescript": "^7.16.7",
2024
"@babel/runtime": "^7.8.7",
2125
"@stripe/react-stripe-js": "1.3.0",
2226
"@stripe/stripe-js": "1.3.0",
2327
"@testing-library/jest-dom": "^5.5.0",
2428
"@testing-library/react": "^9.4.0",
25-
"@types/jest": "^25.2.1",
29+
"@types/jest": "^25.2.3",
30+
"@types/node": "^17.0.24",
31+
"@types/react": "^18.0.5",
32+
"@types/react-dom": "^18.0.1",
33+
"@types/react-redux-toastr": "^7.6.2",
2634
"@types/systemjs": "^6.1.0",
2735
"autoprefixer": "^9.8.6",
2836
"babel-eslint": "^11.0.0-beta.2",
@@ -57,10 +65,13 @@
5765
"webpack-merge": "^4.2.2"
5866
},
5967
"dependencies": {
68+
"@datadog/browser-logs": "^4.7.1",
69+
"@heroicons/react": "^1.0.6",
6070
"@reach/router": "^1.3.4",
6171
"apexcharts": "^3.32.1",
6272
"axios": "^0.21.0",
6373
"body-parser": "^1.19.0",
74+
"browser-cookies": "^1.2.0",
6475
"classnames": "^2.2.6",
6576
"config": "^3.3.6",
6677
"cors": "^2.8.5",
@@ -79,17 +90,20 @@
7990
"react-dropzone": "^11.4.2",
8091
"react-gtm-module": "^2.0.11",
8192
"react-redux": "^7.2.2",
82-
"react-redux-toastr": "^7.6.5",
93+
"react-redux-toastr": "^7.6.8",
8394
"react-responsive-modal": "^6.2.0",
95+
"react-router-dom": "^6.3.0",
8496
"react-select": "^4.0.2",
8597
"react-spinners": "^0.11.0",
98+
"react-toastify": "^8.2.0",
8699
"react-tooltip": "^4.2.21",
87100
"reactjs-heap": "^1.0.3",
88101
"redux": "^4.0.5",
89102
"redux-logger": "^3.0.6",
90103
"redux-promise-middleware": "^6.1.2",
91104
"redux-thunk": "^2.3.0",
92105
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.4",
106+
"typescript": "^4.6.3",
93107
"uuid": "^8.3.2"
94108
},
95109
"browserslist": [

src-ts/config/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export enum ToolTitle {
2+
designLib = 'Design Library',
3+
settings = 'Profile Settings',
4+
work = 'Work',
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export enum AppHostEnvironment {
2+
bsouza = 'bsouza',
3+
default = 'default',
4+
dev = 'dev',
5+
prod = 'prod',
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { GlobalConfig } from '../../lib'
2+
3+
import { AppHostEnvironment } from './app-host-environment.enum'
4+
import { EnvironmentConfigDefault } from './environment.default.config'
5+
6+
export const EnvironmentConfigBsouza: GlobalConfig = {
7+
...EnvironmentConfigDefault,
8+
ENV: AppHostEnvironment.bsouza,
9+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { GlobalConfig } from '../../lib'
2+
3+
import { AppHostEnvironment } from './app-host-environment.enum'
4+
import { EnvironmentConfigBsouza } from './environment.bsouza.config'
5+
import { EnvironmentConfigDefault } from './environment.default.config'
6+
import { EnvironmentConfigDev } from './environment.dev.config'
7+
import { EnvironmentConfigProd } from './environment.prod.config'
8+
9+
function getEnvironmentConfig(): GlobalConfig {
10+
11+
switch (process.env.REACT_APP_HOST_ENV) {
12+
13+
case AppHostEnvironment.bsouza:
14+
return EnvironmentConfigBsouza
15+
16+
case AppHostEnvironment.default:
17+
return EnvironmentConfigDefault
18+
19+
case AppHostEnvironment.dev:
20+
return EnvironmentConfigDev
21+
22+
case AppHostEnvironment.prod:
23+
return EnvironmentConfigProd
24+
25+
default:
26+
return EnvironmentConfigDefault
27+
}
28+
}
29+
30+
const enviromentConfig: GlobalConfig = {
31+
...getEnvironmentConfig(),
32+
}
33+
34+
export default enviromentConfig
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { GlobalConfig } from '../../lib'
2+
3+
import { AppHostEnvironment } from './app-host-environment.enum'
4+
5+
export const EnvironmentConfigDefault: GlobalConfig = {
6+
API: {
7+
V3: 'https://api.topcoder-dev.com/v3',
8+
V5: 'https://api.topcoder-dev.com/v5',
9+
},
10+
ENV: AppHostEnvironment.default,
11+
LOGGING: {
12+
PUBLIC_TOKEN: 'puba0825671e469d16f940c5a30dc738f11',
13+
SERVICE: 'platform-ui',
14+
},
15+
REAUTH_OFFSET: 55,
16+
TAG_MANAGER_ID: undefined,
17+
URL: {
18+
ACCOUNTS_APP_CONNECTOR: 'https://accounts-auth0.topcoder-dev.com',
19+
},
20+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { GlobalConfig } from '../../lib'
2+
import { ToolTitle } from '../constants'
3+
4+
import { AppHostEnvironment } from './app-host-environment.enum'
5+
import { EnvironmentConfigDefault } from './environment.default.config'
6+
7+
export const EnvironmentConfigDev: GlobalConfig = {
8+
...EnvironmentConfigDefault,
9+
DISABLED_TOOLS: [
10+
ToolTitle.designLib,
11+
],
12+
ENV: AppHostEnvironment.dev,
13+
TAG_MANAGER_ID: 'GTM-W7B537Z',
14+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { GlobalConfig } from '../../lib'
2+
import { ToolTitle } from '../constants'
3+
4+
import { AppHostEnvironment } from './app-host-environment.enum'
5+
import { EnvironmentConfigDefault } from './environment.default.config'
6+
7+
export const EnvironmentConfigProd: GlobalConfig = {
8+
...EnvironmentConfigDefault,
9+
API: {
10+
V3: 'https://api.topcoder.com/v3',
11+
V5: 'https://api.topcoder.com/v5',
12+
},
13+
DISABLED_TOOLS: [
14+
ToolTitle.designLib,
15+
],
16+
ENV: AppHostEnvironment.prod,
17+
TAG_MANAGER_ID: 'GTM-MXXQHG8',
18+
URL: {
19+
ACCOUNTS_APP_CONNECTOR: 'https://accounts-auth0.topcoder.com',
20+
},
21+
}

src-ts/config/environments/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as EnvironmentConfig } from './environment.config'

0 commit comments

Comments
 (0)