import { List, Switch } from 'antd'; import React, { Fragment } from 'react'; type Unpacked = T extends (infer U)[] ? U : T; const NotificationView: React.FC = () => { const getData = () => { const Action = ( ); return [ { title: '用户消息', description: '其他用户的消息将以站内信的形式通知', actions: [Action], }, { title: '系统消息', description: '系统消息将以站内信的形式通知', actions: [Action], }, { title: '待办任务', description: '待办任务将以站内信的形式通知', actions: [Action], }, ]; }; const data = getData(); return ( > itemLayout="horizontal" dataSource={data} renderItem={(item) => ( )} /> ); }; export default NotificationView;