RegisterResult.js 1.1 KB
Newer Older
1
import React from 'react';
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';
5
import Result from '@/components/Result';
ddcat1115's avatar
ddcat1115 committed
6 7
import styles from './RegisterResult.less';

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="app.register-result.view-mailbox" />
jim's avatar
jim committed
13 14 15
      </Button>
    </a>
    <Link to="/">
16 17 18
      <Button size="large">
        <FormattedMessage id="app.register-result.back-home" />
      </Button>
jim's avatar
jim committed
19
    </Link>
20 21 22
  </div>
);

Erwin Zhang's avatar
Erwin Zhang committed
23
const RegisterResult = ({ 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 30 31 32
        <FormattedMessage
          id="app.register-result.msg"
          values={{ email: location.state ? location.state.account : 'AntDesign@example.com' }}
        />
ddcat1115's avatar
ddcat1115 committed
33 34
      </div>
    }
35
    description={formatMessage({ id: 'app.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 RegisterResult;