tootlab-mastodon/app/javascript/flavours/glitch/containers/admin_component.jsx
Renaud Chaput 9e133e2527 [Glitch] Upgrade react-intl
Port 44cd88adc4 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-06-10 14:37:08 +02:00

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>
);
}
}