index.tsx 1.94 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';
6 7

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

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

export default () => (
陈帅's avatar
陈帅 committed
54 55 56 57 58 59 60 61 62 63 64 65
  <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>
66
);