|
|
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
|
|
|
|
|
|
import AdminSlackIntegrationLegacyContainer from '~/client/services/AdminSlackIntegrationLegacyContainer';
|
|
|
import { toastError } from '~/client/util/apiNotification';
|
|
|
-import { useSWRxLegacySlackIntegrationSetting } from '~/stores/legacy-slack-integration';
|
|
|
import { toArrayIfNot } from '~/utils/array-utils';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
@@ -16,19 +15,14 @@ import SlackConfiguration from './SlackConfiguration';
|
|
|
|
|
|
const logger = loggerFactory('growi:NotificationSetting');
|
|
|
|
|
|
-// const retrieveErrors = null;
|
|
|
+const retrieveErrors = null;
|
|
|
function LegacySlackIntegration(props) {
|
|
|
const { t } = useTranslation();
|
|
|
- const { data: legacySlackIntegrationSettingData } = useSWRxLegacySlackIntegrationSetting();
|
|
|
const { adminSlackIntegrationLegacyContainer } = props;
|
|
|
|
|
|
-
|
|
|
- useEffect(() => {
|
|
|
-
|
|
|
- }, [legacySlackIntegrationSettingData]);
|
|
|
-
|
|
|
if (adminSlackIntegrationLegacyContainer.state.webhookUrl === adminSlackIntegrationLegacyContainer.dummyWebhookUrl) {
|
|
|
- // TODO: SWRize adminSlackIntegrationLegacyContainer.retrieveData();
|
|
|
+ // TODO: Omit AdminSlackIntegrationLegacyContainer by https://redmine.weseek.co.jp/issues/100947
|
|
|
+
|
|
|
// throw (async() => {
|
|
|
// try {
|
|
|
// await adminSlackIntegrationLegacyContainer.retrieveData();
|
|
|
@@ -43,9 +37,9 @@ function LegacySlackIntegration(props) {
|
|
|
// })();
|
|
|
}
|
|
|
|
|
|
- // if (adminSlackIntegrationLegacyContainer.state.webhookUrl === adminSlackIntegrationLegacyContainer.dummyWebhookUrlForError) {
|
|
|
- // throw new Error(`${retrieveErrors.length} errors occured`);
|
|
|
- // }
|
|
|
+ if (adminSlackIntegrationLegacyContainer.state.webhookUrl === adminSlackIntegrationLegacyContainer.dummyWebhookUrlForError) {
|
|
|
+ throw new Error(`${retrieveErrors.length} errors occured`);
|
|
|
+ }
|
|
|
|
|
|
const isDisabled = adminSlackIntegrationLegacyContainer.state.isSlackbotConfigured;
|
|
|
|