2017-08-13 19:53:31 -07:00
|
|
|
import React from 'react';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import PropTypes from 'prop-types';
|
2017-11-17 19:11:18 -08:00
|
|
|
import configureStore from 'themes/glitch/store/configureStore';
|
|
|
|
import { hydrateStore } from 'themes/glitch/actions/store';
|
2017-08-13 19:53:31 -07:00
|
|
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
2017-11-17 19:11:18 -08:00
|
|
|
import { getLocale } from 'mastodon/locales';
|
|
|
|
import Compose from 'themes/glitch/features/standalone/compose';
|
|
|
|
import initialState from 'themes/glitch/util/initial_state';
|
2017-08-13 19:53:31 -07:00
|
|
|
|
|
|
|
const { localeData, messages } = getLocale();
|
|
|
|
addLocaleData(localeData);
|
|
|
|
|
|
|
|
const store = configureStore();
|
|
|
|
|
2017-10-27 08:04:44 -07:00
|
|
|
if (initialState) {
|
2017-08-13 19:53:31 -07:00
|
|
|
store.dispatch(hydrateStore(initialState));
|
|
|
|
}
|
|
|
|
|
|
|
|
export default class TimelineContainer extends React.PureComponent {
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
locale: PropTypes.string.isRequired,
|
|
|
|
};
|
|
|
|
|
|
|
|
render () {
|
|
|
|
const { locale } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<IntlProvider locale={locale} messages={messages}>
|
|
|
|
<Provider store={store}>
|
|
|
|
<Compose />
|
|
|
|
</Provider>
|
|
|
|
</IntlProvider>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|