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.

38 lines
1014 B

  1. import React from 'react';
  2. import { Provider } from 'react-redux';
  3. import PropTypes from 'prop-types';
  4. import configureStore from 'flavours/glitch/store/configureStore';
  5. import { hydrateStore } from 'flavours/glitch/actions/store';
  6. import { IntlProvider, addLocaleData } from 'react-intl';
  7. import { getLocale } from 'mastodon/locales';
  8. import Compose from 'flavours/glitch/features/standalone/compose';
  9. import initialState from 'flavours/glitch/util/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. }