index.tsx 1.89 KB
Newer Older
陈帅's avatar
陈帅 committed
1 2
import { Button, Card, Icon } from 'antd';
import { FormattedMessage, formatMessage } from 'umi-plugin-react/locale';
陈帅's avatar
陈帅 committed
3
import React, { Fragment } from 'react';
陈帅's avatar
陈帅 committed
4

陈帅's avatar
陈帅 committed
5
import { GridContent } from '@ant-design/pro-layout';
陈帅's avatar
陈帅 committed
6
import Result from './Result';
陈帅's avatar
陈帅 committed
7
import styles from './index.less';
8 9

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

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

export default () => (
陈帅's avatar
陈帅 committed
49 50 51 52 53 54 55 56 57 58 59 60
  <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>
61
);