2018-05-24 16:35:26 +02:00
|
|
|
// @flow
|
|
|
|
|
2018-05-26 23:51:12 +02:00
|
|
|
/**
|
|
|
|
* AtlasKit components will deflect from appearance if css-reset is not present.
|
|
|
|
*/
|
|
|
|
import '@atlaskit/css-reset';
|
|
|
|
|
2018-07-30 03:55:57 +02:00
|
|
|
import { SpotlightManager } from '@atlaskit/onboarding';
|
|
|
|
|
2018-06-09 18:10:00 +02:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { render } from 'react-dom';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import { PersistGate } from 'redux-persist/integration/react';
|
|
|
|
|
2018-06-03 04:36:16 +02:00
|
|
|
import { App } from './features/app';
|
2018-06-09 18:10:00 +02:00
|
|
|
import { persistor, store } from './features/redux';
|
2018-06-03 04:36:16 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component encapsulating App component with redux store using provider.
|
|
|
|
*/
|
|
|
|
class Root extends Component<*> {
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
2018-06-07 09:47:42 +02:00
|
|
|
*
|
|
|
|
* @returns {ReactElement}
|
2018-06-03 04:36:16 +02:00
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Provider store = { store }>
|
2018-06-09 18:10:00 +02:00
|
|
|
<PersistGate
|
|
|
|
loading = { null }
|
|
|
|
persistor = { persistor }>
|
2018-07-30 03:55:57 +02:00
|
|
|
<SpotlightManager>
|
|
|
|
<App />
|
|
|
|
</SpotlightManager>
|
2018-06-09 18:10:00 +02:00
|
|
|
</PersistGate>
|
2018-06-03 04:36:16 +02:00
|
|
|
</Provider>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 22:06:55 +02:00
|
|
|
/**
|
|
|
|
* Render the main / root application.
|
2019-10-16 17:31:40 +02:00
|
|
|
*
|
|
|
|
* $FlowFixMe.
|
2018-05-21 22:06:55 +02:00
|
|
|
*/
|
2018-06-03 04:36:16 +02:00
|
|
|
render(<Root />, document.getElementById('app'));
|