Error.js 1.97 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';
sorrycc's avatar
sorrycc committed
4
import Result from '@/components/Result';
5
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
6 7

const extra = (
陈帅's avatar
陈帅 committed
8
  <Fragment>
jim's avatar
jim committed
9 10 11 12 13 14 15 16
    <div
      style={{
        fontSize: 16,
        color: 'rgba(0, 0, 0, 0.85)',
        fontWeight: '500',
        marginBottom: 16,
      }}
    >
张秀玲's avatar
张秀玲 committed
17 18 19 20
      <FormattedMessage
        id="app.result.error.hint-title"
        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 25 26 27
      <FormattedMessage
        id="app.result.error.hint-text1"
        defaultMessage="Your account has been frozen"
      />
jim's avatar
jim committed
28
      <a style={{ marginLeft: 16 }}>
张秀玲's avatar
张秀玲 committed
29 30
        <FormattedMessage id="app.result.error.hint-btn1" defaultMessage="Thaw immediately" />
        <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 36 37 38
      <FormattedMessage
        id="app.result.error.hint-text2"
        defaultMessage="Your account is not yet eligible to apply"
      />
jim's avatar
jim committed
39
      <a style={{ marginLeft: 16 }}>
张秀玲's avatar
张秀玲 committed
40 41
        <FormattedMessage id="app.result.error.hint-btn2" defaultMessage="Upgrade immediately" />
        <Icon type="right" />
jim's avatar
jim committed
42
      </a>
43
    </div>
陈帅's avatar
陈帅 committed
44
  </Fragment>
45 46
);

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

export default () => (
54
  <PageHeaderWrapper>
55
    <Card bordered={false}>
56 57
      <Result
        type="error"
张秀玲's avatar
张秀玲 committed
58 59
        title={formatMessage({ id: 'app.result.error.title' }, {})}
        description={formatMessage({ id: 'app.result.error.description' }, {})}
60 61
        extra={extra}
        actions={actions}
ddcat1115's avatar
ddcat1115 committed
62
        style={{ marginTop: 48, marginBottom: 16 }}
63 64
      />
    </Card>
65
  </PageHeaderWrapper>
66
);