99 APP_READY ,
1010 initialize ,
1111 subscribe ,
12+ mergeConfig ,
1213} from '@edx/frontend-platform' ;
1314
1415import Header from '@edx/frontend-component-header' ;
@@ -21,7 +22,26 @@ import { OrdersAndSubscriptionsPage } from './orders-and-subscriptions';
2122
2223import './index.scss' ;
2324
25+ /**
26+ * TEMPORARY
27+ *
28+ * Until we add the following keys in frontend-platform,
29+ * use mergeConfig to join it with the rest of the config items
30+ * (so we don't need to get it separately from process.env).
31+ * After we add the keys to frontend-platform, this mergeConfig can go away
32+ */
33+ mergeConfig ( {
34+ COMMERCE_COORDINATOR_BASE_URL : process . env . COMMERCE_COORDINATOR_BASE_URL ,
35+ ENABLE_B2C_SUBSCRIPTIONS : process . env . ENABLE_B2C_SUBSCRIPTIONS ,
36+ SUBSCRIPTIONS_BASE_URL : process . env . SUBSCRIPTIONS_BASE_URL ,
37+ SUPPORT_URL : process . env . SUPPORT_URL ,
38+ } ) ;
39+
2440subscribe ( APP_READY , ( ) => {
41+ if ( process . env . NODE_ENV === 'development' ) {
42+ global . analytics ?. debug ( ) ;
43+ }
44+
2545 ReactDOM . render (
2646 < AppProvider store = { configureStore ( ) } >
2747 < Header />
@@ -39,7 +59,12 @@ subscribe(APP_READY, () => {
3959} ) ;
4060
4161subscribe ( APP_INIT_ERROR , ( error ) => {
42- ReactDOM . render ( < IntlProvider locale = "en" > < ErrorPage message = { error . message } /> </ IntlProvider > , document . getElementById ( 'root' ) ) ;
62+ ReactDOM . render (
63+ < IntlProvider locale = "en" >
64+ < ErrorPage message = { error . message } />
65+ </ IntlProvider > ,
66+ document . getElementById ( 'root' ) ,
67+ ) ;
4368} ) ;
4469
4570initialize ( {
0 commit comments