aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/InviteScreen.js
blob: e54d8d225bf38b0ca029696e57e557805e89ed2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { inject, observer } from 'mobx-react';
import Invite from '../../components/auth/Invite';
import { gaPage } from '../../lib/analytics';

@inject('stores', 'actions') @observer
export default class InviteScreen extends Component {
  componentDidMount() {
    gaPage('Auth/Invite');
  }

  render() {
    const { actions } = this.props;

    return (
      <div className="auth__container auth__container--signup">
        <Invite
          onSubmit={actions.user.invite}
          embed={false}
        />
      </div>
    );
  }
}

InviteScreen.wrappedComponent.propTypes = {
  actions: PropTypes.shape({
    user: PropTypes.shape({
      invite: PropTypes.func.isRequired,
    }).isRequired,
  }).isRequired,
};