diff --git a/frontend/app/components/Client/Integrations/SlackForm.tsx b/frontend/app/components/Client/Integrations/SlackForm.tsx index e04c02de6..7d0cdc610 100644 --- a/frontend/app/components/Client/Integrations/SlackForm.tsx +++ b/frontend/app/components/Client/Integrations/SlackForm.tsx @@ -1,14 +1,16 @@ import React, { useEffect } from 'react'; import SlackChannelList from './SlackChannelList/SlackChannelList'; -import { fetchList } from 'Duck/integrations/slack'; +import { fetchList, init } from 'Duck/integrations/slack'; import { connect } from 'react-redux'; import SlackAddForm from './SlackAddForm'; import { useModal } from 'App/components/Modal'; +import { Button } from 'UI'; interface Props { onEdit: (integration: any) => void; istance: any; fetchList: any; + init: any; } const SlackForm = (props: Props) => { const { istance } = props; @@ -19,6 +21,11 @@ const SlackForm = (props: Props) => { setActive(true); }; + const onNew = () => { + setActive(true); + props.init({}); + } + useEffect(() => { props.fetchList(); }, []); @@ -31,7 +38,10 @@ const SlackForm = (props: Props) => { )}
-

Slack

+
+

Slack

+
@@ -44,5 +54,5 @@ export default connect( (state: any) => ({ istance: state.getIn(['slack', 'instance']), }), - { fetchList } + { fetchList, init } )(SlackForm);