|
|
@@ -12,7 +12,9 @@ import DeleteSlackBotSettingsModal from './DeleteSlackBotSettingsModal';
|
|
|
const logger = loggerFactory('growi:SlackBotSettings');
|
|
|
|
|
|
const OfficialBotSettings = (props) => {
|
|
|
- const { appContainer, slackAppIntegrations, proxyServerUri } = props;
|
|
|
+ const {
|
|
|
+ appContainer, slackAppIntegrations, proxyServerUri, fetchSlackIntegrationData,
|
|
|
+ } = props;
|
|
|
const [isDeleteConfirmModalShown, setIsDeleteConfirmModalShown] = useState(false);
|
|
|
const { t } = useTranslation();
|
|
|
|
|
|
@@ -22,11 +24,17 @@ const OfficialBotSettings = (props) => {
|
|
|
if (proxyServerUri != null) {
|
|
|
setNewProxyServerUri(proxyServerUri);
|
|
|
}
|
|
|
- }, [proxyServerUri]);
|
|
|
+ }, [proxyServerUri, slackAppIntegrations]);
|
|
|
|
|
|
const addSlackAppIntegrationHandler = async() => {
|
|
|
try {
|
|
|
await appContainer.apiv3.put('/slack-integration-settings/slack-app-integrations');
|
|
|
+
|
|
|
+ if (fetchSlackIntegrationData == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.log('hige');
|
|
|
+ fetchSlackIntegrationData();
|
|
|
}
|
|
|
catch (err) {
|
|
|
toastError(err);
|
|
|
@@ -176,6 +184,7 @@ OfficialBotSettings.propTypes = {
|
|
|
|
|
|
slackAppIntegrations: PropTypes.array,
|
|
|
proxyServerUri: PropTypes.string,
|
|
|
+ fetchSlackIntegrationData: PropTypes.func,
|
|
|
};
|
|
|
|
|
|
export default OfficialBotSettingsWrapper;
|