index.tsx 2.05 KB
Newer Older
陈帅's avatar
陈帅 committed
1
import React, { Fragment } from 'react';
陈帅's avatar
陈帅 committed
2
import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale';
3
import { Button, Icon, Card } from 'antd';
陈帅's avatar
陈帅 committed
4 5
import Result from './Result';
import { GridContent } from '@ant-design/pro-layout';
陈帅's avatar
陈帅 committed
6
import styles from './index.less';
7 8

const extra = (
陈帅's avatar
陈帅 committed
9
  <Fragment>
jim's avatar
jim committed
10 11 12 13
    <div
      style={{
        fontSize: 16,
        color: 'rgba(0, 0, 0, 0.85)',
陈帅's avatar
陈帅 committed
14
        fontWeight: 500,
jim's avatar
jim committed
15 16 17
        marginBottom: 16,
      }}
    >
张秀玲's avatar
张秀玲 committed
18
      <FormattedMessage
19
        id="BLOCK_NAME.error.hint-title"
张秀玲's avatar
张秀玲 committed
20 21
        defaultMessage="The content you submitted has the following error:"
      />
22
    </div>
ddcat1115's avatar
ddcat1115 committed
23
    <div style={{ marginBottom: 16 }}>
陈帅's avatar
陈帅 committed
24
      <Icon style={{ marginRight: 8 }} className={styles.error_icon} type="close-circle-o" />
张秀玲's avatar
张秀玲 committed
25
      <FormattedMessage
26
        id="BLOCK_NAME.error.hint-text1"
张秀玲's avatar
张秀玲 committed
27 28
        defaultMessage="Your account has been frozen"
      />
jim's avatar
jim committed
29
      <a style={{ marginLeft: 16 }}>
30
        <FormattedMessage id="BLOCK_NAME.error.hint-btn1" defaultMessage="Thaw immediately" />
张秀玲's avatar
张秀玲 committed
31
        <Icon type="right" />
jim's avatar
jim committed
32
      </a>
33 34
    </div>
    <div>
陈帅's avatar
陈帅 committed
35 36 37 38 39
      <Icon
        style={{ color: '#f5222d', marginRight: 8 }}
        className={styles.error_icon}
        type="close-circle-o"
      />
张秀玲's avatar
张秀玲 committed
40
      <FormattedMessage
41
        id="BLOCK_NAME.error.hint-text2"
张秀玲's avatar
张秀玲 committed
42 43
        defaultMessage="Your account is not yet eligible to apply"
      />
jim's avatar
jim committed
44
      <a style={{ marginLeft: 16 }}>
45
        <FormattedMessage id="BLOCK_NAME.error.hint-btn2" defaultMessage="Upgrade immediately" />
张秀玲's avatar
张秀玲 committed
46
        <Icon type="right" />
jim's avatar
jim committed
47
      </a>
48
    </div>
陈帅's avatar
陈帅 committed
49
  </Fragment>
50 51
);

张秀玲's avatar
张秀玲 committed
52 53
const actions = (
  <Button type="primary">
54
    <FormattedMessage id="BLOCK_NAME.error.btn-text" defaultMessage="Return to modify" />
张秀玲's avatar
张秀玲 committed
55 56
  </Button>
);
57 58

export default () => (
陈帅's avatar
陈帅 committed
59 60 61 62 63 64 65 66 67 68 69 70
  <GridContent>
    <Card bordered={false}>
      <Result
        type="error"
        title={formatMessage({ id: 'BLOCK_NAME.error.title' })}
        description={formatMessage({ id: 'BLOCK_NAME.error.description' })}
        extra={extra}
        actions={actions}
        style={{ marginTop: 48, marginBottom: 16 }}
      />
    </Card>
  </GridContent>
71
);