mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-05 10:09:04 +01:00
27 lines
605 B
React
27 lines
605 B
React
|
import React from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
||
|
import { getLocale } from 'mastodon/locales';
|
||
|
|
||
|
const { localeData, messages } = getLocale();
|
||
|
addLocaleData(localeData);
|
||
|
|
||
|
export default class AdminComponent extends React.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>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|