aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/SetupAssistantScreen.tsx
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-06-26 23:59:32 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-26 21:59:32 +0000
commit6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9 (patch)
tree1676f5eef42b8086d28476c7eaad62c7b1753120 /src/containers/auth/SetupAssistantScreen.tsx
parentReduce tab item layout shift (#376) (diff)
downloadferdium-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.tsx27
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 */
2import { Component } from 'react'; 2import { Component, ReactElement } from 'react';
3import { inject, observer } from 'mobx-react'; 3import { inject, observer } from 'mobx-react';
4 4
5import { RouterStore } from 'mobx-react-router'; 5import { DefaultProps } from 'src/@types/ferdium-components.types';
6import { sleep } from '../../helpers/async-helpers'; 6import { sleep } from '../../helpers/async-helpers';
7import SetupAssistant from '../../components/auth/SetupAssistant'; 7import SetupAssistant from '../../components/auth/SetupAssistant';
8import ServicesStore from '../../stores/ServicesStore';
9import RecipesStore from '../../stores/RecipesStore';
10import UserStore from '../../stores/UserStore';
11 8
12interface IProps { 9class 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
26class 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)}