index.js 1.13 KB
Newer Older
1
import React from 'react';
2
import { formatMessage, FormattedMessage } from 'umi/locale';
3
import { Button } from 'antd';
zinkey's avatar
zinkey committed
4
import Link from 'umi/link';
5 6
import { Result } from 'ant-design-pro';
import styles from './style.less';
ddcat1115's avatar
ddcat1115 committed
7

8
const actions = (
ddcat1115's avatar
ddcat1115 committed
9
  <div className={styles.actions}>
jim's avatar
jim committed
10 11
    <a href="">
      <Button size="large" type="primary">
12
        <FormattedMessage id="BLOCK_NAME.register-result.view-mailbox" />
jim's avatar
jim committed
13 14 15
      </Button>
    </a>
    <Link to="/">
16
      <Button size="large">
17
        <FormattedMessage id="BLOCK_NAME.register-result.back-home" />
18
      </Button>
jim's avatar
jim committed
19
    </Link>
20 21 22
  </div>
);

23
const PAGE_NAME_UPPER_CAMEL_CASE = ({ location }) => (
ddcat1115's avatar
ddcat1115 committed
24
  <Result
ddcat1115's avatar
ddcat1115 committed
25
    className={styles.registerResult}
ddcat1115's avatar
ddcat1115 committed
26
    type="success"
ddcat1115's avatar
ddcat1115 committed
27 28
    title={
      <div className={styles.title}>
29
        <FormattedMessage
30
          id="BLOCK_NAME.register-result.msg"
31 32
          values={{ email: location.state ? location.state.account : 'AntDesign@example.com' }}
        />
ddcat1115's avatar
ddcat1115 committed
33 34
      </div>
    }
35
    description={formatMessage({ id: 'BLOCK_NAME.register-result.activation-email' })}
ddcat1115's avatar
ddcat1115 committed
36
    actions={actions}
ddcat1115's avatar
ddcat1115 committed
37
    style={{ marginTop: 56 }}
ddcat1115's avatar
ddcat1115 committed
38
  />
39
);
Erwin Zhang's avatar
Erwin Zhang committed
40

41
export default PAGE_NAME_UPPER_CAMEL_CASE;