logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

compose_container.js (951B)


  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. const { localeData, messages } = getLocale();
  11. addLocaleData(localeData);
  12. const store = configureStore();
  13. if (initialState) {
  14. store.dispatch(hydrateStore(initialState));
  15. }
  16. export default class TimelineContainer extends React.PureComponent {
  17. static propTypes = {
  18. locale: PropTypes.string.isRequired,
  19. };
  20. render () {
  21. const { locale } = this.props;
  22. return (
  23. <IntlProvider locale={locale} messages={messages}>
  24. <Provider store={store}>
  25. <Compose />
  26. </Provider>
  27. </IntlProvider>
  28. );
  29. }
  30. }