import React, { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import PropTypes from 'prop-types'; import AppContainer from '../../../services/AppContainer'; import AdminAppContainer from '../../../services/AdminAppContainer'; import { withUnstatedContainers } from '../../UnstatedUtils'; import { toastSuccess, toastError } from '../../../util/apiNotification'; import CustomBotWithoutProxySettingsAccordion, { botInstallationStep } from './CustomBotWithoutProxySettingsAccordion'; import CustomBotWithoutProxyIntegrationCard from './CustomBotWithoutProxyIntegrationCard'; import DeleteSlackBotSettingsModal from './DeleteSlackBotSettingsModal'; const CustomBotWithoutProxySettings = (props) => { const { appContainer } = props; const { t } = useTranslation(); const [siteName, setSiteName] = useState(''); const [isDeleteConfirmModalShown, setIsDeleteConfirmModalShown] = useState(false); const deleteSlackSettingsHandler = async() => { try { await appContainer.apiv3.put('/slack-integration-settings/bot-type', { slackSigningSecret: null, slackBotToken: null, currentBotType: null, }); toastSuccess('success'); } catch (err) { toastError(err); } }; useEffect(() => { const siteName = appContainer.config.crowi.title; setSiteName(siteName); }, [appContainer]); return ( <>