import React from 'react' import { connect } from 'react-redux' import { edit, save, init } from 'Duck/integrations/slack' import { Form, Input, Button, Message } from 'UI' import { confirm } from 'UI/Confirmation'; import { remove } from 'Duck/integrations/slack' class SlackAddForm extends React.PureComponent { componentWillUnmount() { this.props.init({}); } save = () => { this.props.save(this.props.instance).then(function() { }) } remove = async (id) => { if (await confirm({ header: 'Confirm', confirmButton: 'Yes, Delete', confirmation: `Are you sure you want to permanently delete this channel?` })) { this.props.remove(id); } } write = ({ target: { name, value } }) => this.props.edit({ [ name ]: value }); render() { const { instance, saving, errors, onClose } = this.props; return (