aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/ImportScreen.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/auth/ImportScreen.tsx')
-rw-r--r--src/containers/auth/ImportScreen.tsx36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/containers/auth/ImportScreen.tsx b/src/containers/auth/ImportScreen.tsx
new file mode 100644
index 000000000..756a2e59c
--- /dev/null
+++ b/src/containers/auth/ImportScreen.tsx
@@ -0,0 +1,36 @@
1import { Component } from 'react';
2import { inject, observer } from 'mobx-react';
3import { RouterStore } from 'mobx-react-router';
4import Import from '../../components/auth/Import';
5import UserStore from '../../stores/UserStore';
6
7interface IProps {
8 actions: {
9 user: UserStore,
10 },
11 stores: {
12 user: UserStore,
13 router: RouterStore,
14 }
15}
16
17class ImportScreen extends Component<IProps> {
18 render() {
19 const { actions, stores } = this.props;
20
21 if (stores.user.isImportLegacyServicesCompleted) {
22 stores.router.push(stores.user.inviteRoute);
23 }
24
25 return (
26 <Import
27 services={stores.user.legacyServices}
28 onSubmit={actions.user.importLegacyServices}
29 isSubmitting={stores.user.isImportLegacyServicesExecuting}
30 inviteRoute={stores.user.inviteRoute}
31 />
32 );
33 }
34}
35
36export default inject('stores', 'actions')(observer(ImportScreen));