1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-12-15 07:08:58 +09:00
whippy-edition/app/javascript/mastodon/containers/admin_component.jsx

29 lines
607 B
React
Raw Normal View History

import PropTypes from 'prop-types';
import { PureComponent } from 'react';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
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 (
<IntlProvider locale={locale} messages={messages}>
{children}
</IntlProvider>
);
}
}