feat: upgrade to frontend-platform (#31)
BREAKING CHANGE: This package now depends on frontend-platform instead of individual runway packages
This commit is contained in:
@@ -2,18 +2,20 @@ import 'babel-polyfill';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { App, AppContext, APP_READY, AppProvider } from '@edx/frontend-base';
|
||||
import { NewRelicLoggingService } from '@edx/frontend-logging';
|
||||
import { initialize, APP_READY } from '@edx/frontend-platform/init';
|
||||
import { getConfig } from '@edx/frontend-platform/config';
|
||||
import { AppContext, AppProvider } from '@edx/frontend-platform/react';
|
||||
import { subscribe } from '@edx/frontend-platform/pubSub';
|
||||
import './index.scss';
|
||||
import Header from '../src/';
|
||||
|
||||
App.subscribe(APP_READY, () => {
|
||||
subscribe(APP_READY, () => {
|
||||
ReactDOM.render(
|
||||
<AppProvider>
|
||||
{/* We can fake out authentication by including another provider here with the data we want */}
|
||||
<AppContext.Provider value={{
|
||||
authenticatedUser: null,
|
||||
config: App.config
|
||||
config: getConfig(),
|
||||
}}>
|
||||
<Header />
|
||||
</AppContext.Provider>
|
||||
@@ -27,7 +29,7 @@ App.subscribe(APP_READY, () => {
|
||||
roles: [],
|
||||
administrator: false,
|
||||
},
|
||||
config: App.config
|
||||
config: getConfig(),
|
||||
}}>
|
||||
<Header />
|
||||
</AppContext.Provider>
|
||||
@@ -37,6 +39,6 @@ App.subscribe(APP_READY, () => {
|
||||
);
|
||||
});
|
||||
|
||||
App.initialize({
|
||||
initialize({
|
||||
messages: []
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user