diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-10-13 12:29:40 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2017-10-13 12:29:40 +0200 |
commit | 58cda9cc7fb79ca9df6746de7f9662bc08dc156a (patch) | |
tree | 1211600c2a5d3b5f81c435c6896618111a611720 /src/containers/auth/SignupScreen.js | |
download | ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.gz ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.tar.zst ferdium-app-58cda9cc7fb79ca9df6746de7f9662bc08dc156a.zip |
initial commit
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 | }; | ||