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