diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index b259d6f8..4336de96 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -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; diff --git a/src/components/NoticeIcon/index.tsx b/src/components/NoticeIcon/index.tsx index 7c4cd29d..326a363b 100644 --- a/src/components/NoticeIcon/index.tsx +++ b/src/components/NoticeIcon/index.tsx @@ -70,7 +70,7 @@ const getUnreadData = (noticeData: Record) => { return unreadMsg; }; -const NoticeIconView = () => { +const NoticeIconView: React.FC = () => { const { initialState } = useModel('@@initialState'); const { currentUser } = initialState || {}; const [notices, setNotices] = useState([]); diff --git a/src/pages/Admin.tsx b/src/pages/Admin.tsx index abd291f6..d8922fa2 100644 --- a/src/pages/Admin.tsx +++ b/src/pages/Admin.tsx @@ -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 ( { ); }; + +export default Admin; diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index 12bf6d2a..ed10f13d 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -12,7 +12,7 @@ const CodePreview: React.FC = ({ children }) => ( ); -export default (): React.ReactNode => { +const Welcome: React.FC = () => { const intl = useIntl(); return ( @@ -61,3 +61,5 @@ export default (): React.ReactNode => { ); }; + +export default Welcome;