1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-13 22:29:07 +09:00
YuruToot/app/javascript/mastodon/containers/admin_component.jsx

28 lines
596 B
React
Raw Normal View History

import PropTypes from 'prop-types';
import { PureComponent } from 'react';
2023-06-01 06:43:39 +09:00
import { IntlProvider } from 'react-intl';
2023-06-01 06:43:39 +09:00
import { getLocale, onProviderError } from '../locales';
2023-06-01 06:43:39 +09:00
const { messages } = getLocale();
2023-05-23 17:52:27 +09:00
export default class AdminComponent extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
};
render () {
const { locale, children } = this.props;
return (
2023-06-01 06:43:39 +09:00
<IntlProvider locale={locale} messages={messages} onError={onProviderError}>
{children}
</IntlProvider>
);
}
}