diff options
Diffstat (limited to 'src/containers/auth/SignupScreen.js')
-rw-r--r-- | src/containers/auth/SignupScreen.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/containers/auth/SignupScreen.js b/src/containers/auth/SignupScreen.js new file mode 100644 index 000000000..3b86ab138 --- /dev/null +++ b/src/containers/auth/SignupScreen.js | |||
@@ -0,0 +1,43 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | |||
5 | import Signup from '../../components/auth/Signup'; | ||
6 | import UserStore from '../../stores/UserStore'; | ||
7 | import { gaPage } from '../../lib/analytics'; | ||
8 | |||
9 | import { globalError as globalErrorPropType } from '../../prop-types'; | ||
10 | |||
11 | @inject('stores', 'actions') @observer | ||
12 | export default class SignupScreen extends Component { | ||
13 | static propTypes = { | ||
14 | error: globalErrorPropType.isRequired, | ||
15 | }; | ||
16 | |||
17 | componentDidMount() { | ||
18 | gaPage('Auth/Signup'); | ||
19 | } | ||
20 | |||
21 | render() { | ||
22 | const { actions, stores, error } = this.props; | ||
23 | return ( | ||
24 | <Signup | ||
25 | onSubmit={actions.user.signup} | ||
26 | isSubmitting={stores.user.signupRequest.isExecuting} | ||
27 | loginRoute={stores.user.loginRoute} | ||
28 | error={error} | ||
29 | /> | ||
30 | ); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | SignupScreen.wrappedComponent.propTypes = { | ||
35 | actions: PropTypes.shape({ | ||
36 | user: PropTypes.shape({ | ||
37 | signup: PropTypes.func.isRequired, | ||
38 | }).isRequired, | ||
39 | }).isRequired, | ||
40 | stores: PropTypes.shape({ | ||
41 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
42 | }).isRequired, | ||
43 | }; | ||