mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-17 12:24:31 +00:00
9e133e2527
Port 44cd88adc4
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
28 lines
602 B
JavaScript
28 lines
602 B
JavaScript
import PropTypes from 'prop-types';
|
|
import { PureComponent } from 'react';
|
|
|
|
import { IntlProvider } from 'react-intl';
|
|
|
|
import { getLocale, onProviderError } from 'mastodon/locales';
|
|
|
|
const { messages } = getLocale();
|
|
|
|
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} onError={onProviderError}>
|
|
{children}
|
|
</IntlProvider>
|
|
);
|
|
}
|
|
|
|
}
|