Files
frontend-app-discussions/src/index.jsx
Mehak Nasir 2ea48f6825 Revert build fail (#179)
* fix: dropped support for better-react-mathjax as it is causing build issues

* fix: mathjax package reverted to avoid build issue
2022-06-01 12:29:18 +05:00

38 lines
855 B
JavaScript
Executable File

import 'core-js/stable';
import 'regenerator-runtime/runtime';
import React from 'react';
import ReactDOM from 'react-dom';
import {
APP_INIT_ERROR, APP_READY, initialize, subscribe,
} from '@edx/frontend-platform';
import { AppProvider, ErrorPage } from '@edx/frontend-platform/react';
import { DiscussionsHome } from './discussions';
import appMessages from './i18n';
import store from './store';
import './assets/favicon.ico';
import './index.scss';
subscribe(APP_READY, () => {
ReactDOM.render(
<AppProvider store={store}>
<DiscussionsHome />
</AppProvider>,
document.getElementById('root'),
);
});
subscribe(APP_INIT_ERROR, (error) => {
ReactDOM.render(<ErrorPage message={error.message} />, document.getElementById('root'));
});
initialize({
requireAuthenticatedUser: true,
messages: [
appMessages,
],
});