|
@@ -31,9 +31,11 @@ const SlackIntegration = (props) => {
|
|
|
const fetchSlackWorkSpaceName = useCallback(async() => {
|
|
const fetchSlackWorkSpaceName = useCallback(async() => {
|
|
|
console.log('fetchname');
|
|
console.log('fetchname');
|
|
|
if (!isConnectedToSlack) {
|
|
if (!isConnectedToSlack) {
|
|
|
- return null;
|
|
|
|
|
|
|
+ console.log('null 松');
|
|
|
|
|
+ return setSlackWSNameInWithoutProxy(null);
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log('hoge');
|
|
|
const res = await appContainer.apiv3.get('/slack-integration/custom-bot-without-proxy/slack-workspace-name');
|
|
const res = await appContainer.apiv3.get('/slack-integration/custom-bot-without-proxy/slack-workspace-name');
|
|
|
setSlackWSNameInWithoutProxy(res.data.slackWorkSpaceName);
|
|
setSlackWSNameInWithoutProxy(res.data.slackWorkSpaceName);
|
|
|
}
|
|
}
|
|
@@ -59,15 +61,18 @@ const SlackIntegration = (props) => {
|
|
|
setIsSetupSlackBot(isSetupSlackBot);
|
|
setIsSetupSlackBot(isSetupSlackBot);
|
|
|
setIsConnectedToSlack(isConnectedToSlack);
|
|
setIsConnectedToSlack(isConnectedToSlack);
|
|
|
|
|
|
|
|
|
|
+ fetchSlackWorkSpaceName();
|
|
|
|
|
+
|
|
|
if (isConnectedToSlack) {
|
|
if (isConnectedToSlack) {
|
|
|
setIsRegisterSlackCredentials(true);
|
|
setIsRegisterSlackCredentials(true);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
setIsRegisterSlackCredentials(false);
|
|
setIsRegisterSlackCredentials(false);
|
|
|
setIsSendTestMessage(false);
|
|
setIsSendTestMessage(false);
|
|
|
|
|
+ console.log('must be null');
|
|
|
|
|
+ setSlackWSNameInWithoutProxy(null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- fetchSlackWorkSpaceName();
|
|
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|
|
|
toastError(err);
|
|
toastError(err);
|
|
@@ -110,7 +115,7 @@ const SlackIntegration = (props) => {
|
|
|
setSlackBotToken(null);
|
|
setSlackBotToken(null);
|
|
|
setIsConnectedToSlack(false);
|
|
setIsConnectedToSlack(false);
|
|
|
setIsSendTestMessage(false);
|
|
setIsSendTestMessage(false);
|
|
|
- fetchSlackWorkSpaceName();
|
|
|
|
|
|
|
+ setSlackWSNameInWithoutProxy(null);
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|
|
|
toastError(err);
|
|
toastError(err);
|