diff options
Diffstat (limited to 'src/containers/auth/ImportScreen.tsx')
-rw-r--r-- | src/containers/auth/ImportScreen.tsx | 36 |
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 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import { RouterStore } from 'mobx-react-router'; | ||
4 | import Import from '../../components/auth/Import'; | ||
5 | import UserStore from '../../stores/UserStore'; | ||
6 | |||
7 | interface IProps { | ||
8 | actions: { | ||
9 | user: UserStore, | ||
10 | }, | ||
11 | stores: { | ||
12 | user: UserStore, | ||
13 | router: RouterStore, | ||
14 | } | ||
15 | } | ||
16 | |||
17 | class 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 | |||
36 | export default inject('stores', 'actions')(observer(ImportScreen)); | ||