index.tsx 1.21 KB
Newer Older
1
import React from 'react';
陈帅's avatar
陈帅 committed
2
import { formatMessage, FormattedMessage } 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 { RouteChildrenProps } from 'react-router';
陈帅's avatar
陈帅 committed
6
import Result from './Result';
7
import styles from './style.less';
ddcat1115's avatar
ddcat1115 committed
8

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

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

42
export default PAGE_NAME_UPPER_CAMEL_CASE;