Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function* start({guid}) {
try {
let settings: SettingsState = yield select((state: any) => state.settings);
yield call(startApp, settings.activeInstance, guid);
toastr.success('Alert', 'App started successfully');
} catch (e) {
console.log(e);
toastr.success('Error', 'Unable to start app');
}
}
function* stop({guid}) {
try {
let settings: SettingsState = yield select((state: any) => state.settings);
yield call(stopApp, settings.activeInstance, guid);
toastr.success('Alert', 'App stopped successfully');
} catch (e) {
console.log(e);
toastr.success('Error', 'Unable to stop app');
}
}
function* start({guid}) {
try {
let settings: SettingsState = yield select((state: any) => state.settings);
yield call(startApp, settings.activeInstance, guid);
toastr.success('Alert', 'App started successfully');
} catch (e) {
console.log(e);
toastr.success('Error', 'Unable to start app');
}
}
componentWillReceiveProps(nextProps) {
if (nextProps.redirectTo) {
toastr.success('Success', 'The user updated Success.');
this.props.history.push(nextProps.redirectTo);
this.props.onRedirect();
}
}