refactor: AdminComponent

This commit is contained in:
scarf 2025-03-27 01:58:56 +09:00
parent 70085dd2ed
commit 98e87c38a4
No known key found for this signature in database
GPG Key ID: 07CA0A3CCA037E7D
2 changed files with 17 additions and 22 deletions

View File

@ -1,22 +0,0 @@
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
import { IntlProvider } from 'mastodon/locales';
export default class AdminComponent extends PureComponent {
static propTypes = {
children: PropTypes.node.isRequired,
};
render () {
const { children } = this.props;
return (
<IntlProvider>
{children}
</IntlProvider>
);
}
}

View File

@ -0,0 +1,17 @@
import React, { ReactNode } from 'react';
import { IntlProvider } from 'mastodon/locales';
interface Props {
children: ReactNode;
}
const AdminComponent: React.FC<Props> = ({ children }) => {
return (
<IntlProvider>
{children}
</IntlProvider>
);
};
export default AdminComponent;