2023-05-23 11:15:17 -04:00
|
|
|
import PropTypes from 'prop-types';
|
2023-05-23 04:52:27 -04:00
|
|
|
import { PureComponent } from 'react';
|
2023-05-23 11:15:17 -04:00
|
|
|
|
2023-05-31 17:43:39 -04:00
|
|
|
import { IntlProvider } from 'react-intl';
|
2023-05-23 11:15:17 -04:00
|
|
|
|
2017-08-13 22:53:31 -04:00
|
|
|
import { Provider } from 'react-redux';
|
2023-05-23 11:15:17 -04:00
|
|
|
|
|
|
|
import { fetchCustomEmojis } from '../actions/custom_emojis';
|
2017-08-13 22:53:31 -04:00
|
|
|
import { hydrateStore } from '../actions/store';
|
|
|
|
import Compose from '../features/standalone/compose';
|
2017-10-27 11:04:44 -04:00
|
|
|
import initialState from '../initial_state';
|
2023-05-31 17:43:39 -04:00
|
|
|
import { getLocale, onProviderError } from '../locales';
|
2023-05-23 11:15:17 -04:00
|
|
|
import { store } from '../store';
|
2017-08-13 22:53:31 -04:00
|
|
|
|
2023-05-31 17:43:39 -04:00
|
|
|
const { messages } = getLocale();
|
2017-08-13 22:53:31 -04:00
|
|
|
|
2017-10-27 11:04:44 -04:00
|
|
|
if (initialState) {
|
2017-08-13 22:53:31 -04:00
|
|
|
store.dispatch(hydrateStore(initialState));
|
|
|
|
}
|
|
|
|
|
2019-02-04 17:14:57 -05:00
|
|
|
store.dispatch(fetchCustomEmojis());
|
|
|
|
|
2023-05-23 04:52:27 -04:00
|
|
|
export default class TimelineContainer extends PureComponent {
|
2017-08-13 22:53:31 -04:00
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
locale: PropTypes.string.isRequired,
|
|
|
|
};
|
|
|
|
|
|
|
|
render () {
|
|
|
|
const { locale } = this.props;
|
|
|
|
|
|
|
|
return (
|
2023-05-31 17:43:39 -04:00
|
|
|
<IntlProvider locale={locale} messages={messages} onError={onProviderError}>
|
2017-08-13 22:53:31 -04:00
|
|
|
<Provider store={store}>
|
|
|
|
<Compose />
|
|
|
|
</Provider>
|
|
|
|
</IntlProvider>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|