aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar mhatvan <markus_hatvan@aon.at>2021-08-05 08:58:28 +0200
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-05 08:05:49 +0000
commit305c2c5ecb49a1349be2efb1ef557d61da9a64dc (patch)
tree19a05ed4ddfc1e5b5bb7fc3ecc071ad562da820f /src/containers
parentrefactor: minor refactoring: solve name-clash of env vars vs vars in the program (diff)
downloadferdium-app-305c2c5ecb49a1349be2efb1ef557d61da9a64dc.tar.gz
ferdium-app-305c2c5ecb49a1349be2efb1ef557d61da9a64dc.tar.zst
ferdium-app-305c2c5ecb49a1349be2efb1ef557d61da9a64dc.zip
refactor: general code improvements
- replace deprecated fs.exists with fs.existsSync - replace console.log with debug - replace hardcoded FERDI_VERSION in start.js with dynamic one from package.json - correct JSDoc annotations in Handler.js - simplify macOSPermissions.js - updates to various eslint rules - add FileReader to known globals
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/auth/SetupAssistantScreen.js30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/containers/auth/SetupAssistantScreen.js b/src/containers/auth/SetupAssistantScreen.js
index d14085f63..d7036969a 100644
--- a/src/containers/auth/SetupAssistantScreen.js
+++ b/src/containers/auth/SetupAssistantScreen.js
@@ -4,14 +4,27 @@ import PropTypes from 'prop-types';
4import { inject, observer } from 'mobx-react'; 4import { inject, observer } from 'mobx-react';
5 5
6import { RouterStore } from 'mobx-react-router'; 6import { RouterStore } from 'mobx-react-router';
7import { DEFAULT_TODO_RECIPE_ID, DEFAULT_TODO_SERVICE_NAME } from '../../config'; 7import {
8 DEFAULT_TODO_RECIPE_ID,
9 DEFAULT_TODO_SERVICE_NAME,
10} from '../../config';
8import { sleep } from '../../helpers/async-helpers'; 11import { sleep } from '../../helpers/async-helpers';
9import SetupAssistant from '../../components/auth/SetupAssistant'; 12import SetupAssistant from '../../components/auth/SetupAssistant';
10import ServicesStore from '../../stores/ServicesStore'; 13import ServicesStore from '../../stores/ServicesStore';
11import RecipesStore from '../../stores/RecipesStore'; 14import RecipesStore from '../../stores/RecipesStore';
12import UserStore from '../../stores/UserStore'; 15import UserStore from '../../stores/UserStore';
13 16
14export default @inject('stores', 'actions') @observer class SetupAssistantScreen extends Component { 17export default
18@inject('stores', 'actions')
19@observer
20class SetupAssistantScreen extends Component {
21 constructor(props) {
22 super(props);
23 this.state = {
24 isSettingUpServices: false,
25 };
26 }
27
15 // TODO: Why are these hardcoded here? Do they need to conform to specific services in the packaged recipes? If so, its more important to fix this 28 // TODO: Why are these hardcoded here? Do they need to conform to specific services in the packaged recipes? If so, its more important to fix this
16 services = { 29 services = {
17 whatsapp: { 30 whatsapp: {
@@ -50,15 +63,12 @@ export default @inject('stores', 'actions') @observer class SetupAssistantScreen
50 name: 'LinkedIn', 63 name: 'LinkedIn',
51 hasTeamId: false, 64 hasTeamId: false,
52 }, 65 },
53 } 66 };
54
55 state = {
56 isSettingUpServices: false,
57 }
58 67
59 async setupServices(serviceConfig) { 68 async setupServices(serviceConfig) {
60 const { stores: { services } } = this.props; 69 const {
61 console.log(serviceConfig); 70 stores: { services },
71 } = this.props;
62 72
63 this.setState({ 73 this.setState({
64 isSettingUpServices: true, 74 isSettingUpServices: true,
@@ -102,7 +112,7 @@ export default @inject('stores', 'actions') @observer class SetupAssistantScreen
102 render() { 112 render() {
103 return ( 113 return (
104 <SetupAssistant 114 <SetupAssistant
105 onSubmit={(config) => this.setupServices(config)} 115 onSubmit={config => this.setupServices(config)}
106 services={this.services} 116 services={this.services}
107 embed={false} 117 embed={false}
108 isSettingUpServices={this.state.isSettingUpServices} 118 isSettingUpServices={this.state.isSettingUpServices}