aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/SignupScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/auth/SignupScreen.js')
-rw-r--r--src/containers/auth/SignupScreen.js43
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 @@
1import React, { Component } from 'react';
2import PropTypes from 'prop-types';
3import { inject, observer } from 'mobx-react';
4
5import Signup from '../../components/auth/Signup';
6import UserStore from '../../stores/UserStore';
7import { gaPage } from '../../lib/analytics';
8
9import { globalError as globalErrorPropType } from '../../prop-types';
10
11@inject('stores', 'actions') @observer
12export 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
34SignupScreen.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};