Shun Miyazawa 4 лет назад
Родитель
Сommit
6f0ae0eda1

+ 7 - 1
src/client/js/components/Admin/SlackIntegration/CustomBotWithProxySettings.jsx

@@ -17,6 +17,7 @@ const CustomBotWithProxySettings = (props) => {
   } = props;
   } = props;
   const [newProxyServerUri, setNewProxyServerUri] = useState();
   const [newProxyServerUri, setNewProxyServerUri] = useState();
   const [integrationIdToDelete, setIntegrationIdToDelete] = useState(null);
   const [integrationIdToDelete, setIntegrationIdToDelete] = useState(null);
+  const [siteName, setSiteName] = useState('');
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
   const workspaceNameObjects = Object.values(connectionStatuses);
   const workspaceNameObjects = Object.values(connectionStatuses);
@@ -78,13 +79,18 @@ const CustomBotWithProxySettings = (props) => {
     }
     }
   };
   };
 
 
+  useEffect(() => {
+    const siteName = appContainer.config.crowi.title;
+    setSiteName(siteName);
+  }, [appContainer]);
+
   return (
   return (
     <>
     <>
       <h2 className="admin-setting-header mb-2">{t('admin:slack_integration.custom_bot_with_proxy_integration')}</h2>
       <h2 className="admin-setting-header mb-2">{t('admin:slack_integration.custom_bot_with_proxy_integration')}</h2>
 
 
       {/* TODO delete tmp props */}
       {/* TODO delete tmp props */}
       <CustomBotWithProxyIntegrationCard
       <CustomBotWithProxyIntegrationCard
-        siteName="siteName"
+        siteName={siteName}
         slackWorkSpaces={
         slackWorkSpaces={
           [
           [
             { name: 'wsName1', active: true },
             { name: 'wsName1', active: true },