9e133e2527
Port 44cd88adc4
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
27 lines
602 B
JavaScript
27 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>
|
|
);
|
|
}
|
|
|
|
}
|