未验证 提交 3e590349 编写于 作者: 荆棘Justin 提交者: GitHub

refactor: modify all function types in jsx to `React.FC` (#9298)

上级 782cb520
......@@ -2,7 +2,7 @@ import { useIntl } from 'umi';
import { GithubOutlined } from '@ant-design/icons';
import { DefaultFooter } from '@ant-design/pro-layout';
export default () => {
const Footer: React.FC = () => {
const intl = useIntl();
const defaultMessage = intl.formatMessage({
id: 'app.copyright.produced',
......@@ -37,3 +37,5 @@ export default () => {
/>
);
};
export default Footer;
......@@ -70,7 +70,7 @@ const getUnreadData = (noticeData: Record<string, API.NoticeIconItem[]>) => {
return unreadMsg;
};
const NoticeIconView = () => {
const NoticeIconView: React.FC = () => {
const { initialState } = useModel('@@initialState');
const { currentUser } = initialState || {};
const [notices, setNotices] = useState<API.NoticeIconItem[]>([]);
......
......@@ -4,7 +4,7 @@ import { Card, Typography, Alert } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { useIntl } from 'umi';
export default (): React.ReactNode => {
const Admin: React.FC = () => {
const intl = useIntl();
return (
<PageHeaderWrapper
......@@ -41,3 +41,5 @@ export default (): React.ReactNode => {
</PageHeaderWrapper>
);
};
export default Admin;
......@@ -12,7 +12,7 @@ const CodePreview: React.FC = ({ children }) => (
</pre>
);
export default (): React.ReactNode => {
const Welcome: React.FC = () => {
const intl = useIntl();
return (
<PageContainer>
......@@ -61,3 +61,5 @@ export default (): React.ReactNode => {
</PageContainer>
);
};
export default Welcome;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册