diff options
author | 2022-06-26 23:59:32 +0200 | |
---|---|---|
committer | 2022-06-26 21:59:32 +0000 | |
commit | 6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9 (patch) | |
tree | 1676f5eef42b8086d28476c7eaad62c7b1753120 /src/containers/auth/SetupAssistantScreen.tsx | |
parent | Reduce tab item layout shift (#376) (diff) | |
download | ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.tar.gz ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.tar.zst ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.zip |
chore: turned all auth containers into typescript (#375)
Diffstat (limited to 'src/containers/auth/SetupAssistantScreen.tsx')
-rw-r--r-- | src/containers/auth/SetupAssistantScreen.tsx | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/containers/auth/SetupAssistantScreen.tsx b/src/containers/auth/SetupAssistantScreen.tsx index 8f1871776..92f12c0bc 100644 --- a/src/containers/auth/SetupAssistantScreen.tsx +++ b/src/containers/auth/SetupAssistantScreen.tsx | |||
@@ -1,29 +1,12 @@ | |||
1 | /* eslint-disable no-await-in-loop */ | 1 | /* eslint-disable no-await-in-loop */ |
2 | import { Component } from 'react'; | 2 | import { Component, ReactElement } from 'react'; |
3 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
4 | 4 | ||
5 | import { RouterStore } from 'mobx-react-router'; | 5 | import { DefaultProps } from 'src/@types/ferdium-components.types'; |
6 | import { sleep } from '../../helpers/async-helpers'; | 6 | import { sleep } from '../../helpers/async-helpers'; |
7 | import SetupAssistant from '../../components/auth/SetupAssistant'; | 7 | import SetupAssistant from '../../components/auth/SetupAssistant'; |
8 | import ServicesStore from '../../stores/ServicesStore'; | ||
9 | import RecipesStore from '../../stores/RecipesStore'; | ||
10 | import UserStore from '../../stores/UserStore'; | ||
11 | 8 | ||
12 | interface IProps { | 9 | class SetupAssistantScreen extends Component<DefaultProps> { |
13 | stores: { | ||
14 | services: ServicesStore; | ||
15 | router: RouterStore; | ||
16 | recipes?: RecipesStore; | ||
17 | user?: UserStore; | ||
18 | }; | ||
19 | actions: { | ||
20 | user: UserStore; | ||
21 | service: ServicesStore; | ||
22 | recipe: RecipesStore; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | class SetupAssistantScreen extends Component<IProps> { | ||
27 | state = { | 10 | state = { |
28 | isSettingUpServices: false, | 11 | isSettingUpServices: false, |
29 | }; | 12 | }; |
@@ -68,7 +51,7 @@ class SetupAssistantScreen extends Component<IProps> { | |||
68 | }, | 51 | }, |
69 | }; | 52 | }; |
70 | 53 | ||
71 | async setupServices(serviceConfig) { | 54 | async setupServices(serviceConfig: any): Promise<void> { |
72 | const { | 55 | const { |
73 | stores: { services, router }, | 56 | stores: { services, router }, |
74 | } = this.props; | 57 | } = this.props; |
@@ -103,7 +86,7 @@ class SetupAssistantScreen extends Component<IProps> { | |||
103 | router.push('/'); | 86 | router.push('/'); |
104 | } | 87 | } |
105 | 88 | ||
106 | render() { | 89 | render(): ReactElement { |
107 | return ( | 90 | return ( |
108 | <SetupAssistant | 91 | <SetupAssistant |
109 | onSubmit={config => this.setupServices(config)} | 92 | onSubmit={config => this.setupServices(config)} |