index.tsx 1.21 KB
Newer Older
陈帅's avatar
陈帅 committed
1 2
import { FormattedMessage, formatMessage } from 'umi-plugin-react/locale';

3
import { Button } from 'antd';
zinkey's avatar
zinkey committed
4
import Link from 'umi/link';
陈帅's avatar
陈帅 committed
5
import React from 'react';
陈帅's avatar
陈帅 committed
6
import { RouteChildrenProps } from 'react-router';
陈帅's avatar
陈帅 committed
7
import Result from './Result';
8
import styles from './style.less';
ddcat1115's avatar
ddcat1115 committed
9

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

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

43
export default PAGE_NAME_UPPER_CAMEL_CASE;