index.js 1.84 KB
Newer Older
陈帅's avatar
陈帅 committed
1
import React, { Fragment } from 'react';
张秀玲's avatar
张秀玲 committed
2
import { formatMessage, FormattedMessage } from 'umi/locale';
3
import { Button, Icon, Card } from 'antd';
4
import { Result } from 'ant-design-pro';
5 6

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

张秀玲's avatar
张秀玲 committed
46 47
const actions = (
  <Button type="primary">
48
    <FormattedMessage id="BLOCK_NAME.error.btn-text" defaultMessage="Return to modify" />
张秀玲's avatar
张秀玲 committed
49 50
  </Button>
);
51 52

export default () => (
53 54 55 56 57 58 59 60 61 62
  <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>
63
);