import React, { Component, Fragment } from 'react'; import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale'; import { List } from 'antd'; type Unpacked = T extends (infer U)[] ? U : T; const passwordStrength = { strong: ( ), medium: ( ), weak: ( Weak ), }; class SecurityView extends Component { getData = () => [ { title: formatMessage({ id: 'BLOCK_NAME.security.password' }, {}), description: ( {formatMessage({ id: 'BLOCK_NAME.security.password-description' })}: {passwordStrength.strong} ), actions: [ , ], }, { title: formatMessage({ id: 'BLOCK_NAME.security.phone' }, {}), description: `${formatMessage( { id: 'BLOCK_NAME.security.phone-description' }, {} )}:138****8293`, actions: [ , ], }, { title: formatMessage({ id: 'BLOCK_NAME.security.question' }, {}), description: formatMessage({ id: 'BLOCK_NAME.security.question-description' }, {}), actions: [ , ], }, { title: formatMessage({ id: 'BLOCK_NAME.security.email' }, {}), description: `${formatMessage( { id: 'BLOCK_NAME.security.email-description' }, {} )}:ant***sign.com`, actions: [ , ], }, { title: formatMessage({ id: 'BLOCK_NAME.security.mfa' }, {}), description: formatMessage({ id: 'BLOCK_NAME.security.mfa-description' }, {}), actions: [ , ], }, ]; render() { const data = this.getData(); return ( > itemLayout="horizontal" dataSource={data} renderItem={item => ( )} /> ); } } export default SecurityView;