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