mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-15 19:33:32 +00:00
7d7db8977b
Port d27216dc46
to glitch-soc
29 lines
613 B
JavaScript
29 lines
613 B
JavaScript
import PropTypes from 'prop-types';
|
|
import { PureComponent } from 'react';
|
|
|
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
|
|
|
import { getLocale } from 'mastodon/locales';
|
|
|
|
const { localeData, messages } = getLocale();
|
|
addLocaleData(localeData);
|
|
|
|
export default class AdminComponent extends PureComponent {
|
|
|
|
static propTypes = {
|
|
locale: PropTypes.string.isRequired,
|
|
children: PropTypes.node.isRequired,
|
|
};
|
|
|
|
render () {
|
|
const { locale, children } = this.props;
|
|
|
|
return (
|
|
<IntlProvider locale={locale} messages={messages}>
|
|
{children}
|
|
</IntlProvider>
|
|
);
|
|
}
|
|
|
|
}
|