You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0 KiB

  1. import React from 'react';
  2. import { Provider } from 'react-redux';
  3. import PropTypes from 'prop-types';
  4. import configureStore from '../store/configureStore';
  5. import { hydrateStore } from '../actions/store';
  6. import { IntlProvider, addLocaleData } from 'react-intl';
  7. import { getLocale } from '../locales';
  8. import Compose from '../features/standalone/compose';
  9. import initialState from '../initial_state';
  10. import { fetchCustomEmojis } from '../actions/custom_emojis';
  11. const { localeData, messages } = getLocale();
  12. addLocaleData(localeData);
  13. const store = configureStore();
  14. if (initialState) {
  15. store.dispatch(hydrateStore(initialState));
  16. }
  17. store.dispatch(fetchCustomEmojis());
  18. export default class TimelineContainer extends React.PureComponent {
  19. static propTypes = {
  20. locale: PropTypes.string.isRequired,
  21. };
  22. render () {
  23. const { locale } = this.props;
  24. return (
  25. <IntlProvider locale={locale} messages={messages}>
  26. <Provider store={store}>
  27. <Compose />
  28. </Provider>
  29. </IntlProvider>
  30. );
  31. }
  32. }