From 58cda9cc7fb79ca9df6746de7f9662bc08dc156a Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 13 Oct 2017 12:29:40 +0200 Subject: initial commit --- src/containers/auth/ImportScreen.js | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/containers/auth/ImportScreen.js (limited to 'src/containers/auth/ImportScreen.js') diff --git a/src/containers/auth/ImportScreen.js b/src/containers/auth/ImportScreen.js new file mode 100644 index 000000000..ddd56ffb6 --- /dev/null +++ b/src/containers/auth/ImportScreen.js @@ -0,0 +1,41 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { inject, observer } from 'mobx-react'; +import Import from '../../components/auth/Import'; +import UserStore from '../../stores/UserStore'; +import { gaPage } from '../../lib/analytics'; + +@inject('stores', 'actions') @observer +export default class ImportScreen extends Component { + componentDidMount() { + gaPage('Auth/Import'); + } + + render() { + const { actions, stores } = this.props; + + if (stores.user.isImportLegacyServicesCompleted) { + stores.router.push(stores.user.inviteRoute); + } + + return ( + + ); + } +} + +ImportScreen.wrappedComponent.propTypes = { + actions: PropTypes.shape({ + user: PropTypes.shape({ + importLegacyServices: PropTypes.func.isRequired, + }).isRequired, + }).isRequired, + stores: PropTypes.shape({ + user: PropTypes.instanceOf(UserStore).isRequired, + }).isRequired, +}; -- cgit v1.2.3-70-g09d2