Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8322f8b

Browse files
authoredMay 4, 2022
Merge pull request #280 from topcoder-platform/PROD-1840_logging
PROD-1840 logging and environment configs -> master
2 parents bec6507 + 9bbcc16 commit 8322f8b

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed
 

‎src-ts/config/environments/environment.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import { EnvironmentConfigProd } from './environment.prod.config'
88

99
function getEnvironmentConfig(): GlobalConfig {
1010

11-
switch (process.env.REACT_APP_HOST_ENV) {
11+
// switch (process.env.REACT_APP_HOST_ENV) {
12+
// TODO: allow the use of a separate
13+
// process var (REACT_APP_HOST_ENV)
14+
// so that we can have more than just local/dev/prod
15+
switch (process.env.APPENV) {
1216

1317
case AppHostEnvironment.bsouza:
1418
return EnvironmentConfigBsouza

‎src-ts/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { EnvironmentConfig } from './config'
2+
export { logInitialize, ProfileProvider } from './lib'
3+
export { Account } from './utils/account'

‎src-ts/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export {
88
authUrlLogin,
99
authUrlLogout,
1010
authUrlSignup,
11+
logInitialize,
1112
} from './functions'
1213
export * from './svgs'

‎src/App.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ import "react-responsive-modal/styles.css";
1919
import styles from "./styles/main.module.scss";
2020
import SupportPage from "./routes/SupportPage";
2121
import UnderMaintenance from "./routes/UnderMaintenance";
22-
import { Account } from "../src-ts/utils/account";
23-
import { ProfileProvider } from "../src-ts/lib/profile-provider";
22+
23+
import { Account, EnvironmentConfig, logInitialize, ProfileProvider } from "../src-ts";
24+
25+
logInitialize(EnvironmentConfig);
2426

2527
const sidebar = <Sidebar menus={menuItems} />;
2628

0 commit comments

Comments
 (0)
Please sign in to comment.