diff options
Diffstat (limited to 'app/javascript/flavours/glitch/containers/admin_component.jsx')
-rw-r--r-- | app/javascript/flavours/glitch/containers/admin_component.jsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/containers/admin_component.jsx b/app/javascript/flavours/glitch/containers/admin_component.jsx new file mode 100644 index 000000000..64dabac8b --- /dev/null +++ b/app/javascript/flavours/glitch/containers/admin_component.jsx @@ -0,0 +1,26 @@ +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> + ); + } + +} |