Przeglądaj źródła

enable multiple workSpaceName

Shun Miyazawa 4 lat temu
rodzic
commit
cefada2f28

+ 11 - 6
src/client/js/components/Admin/SlackIntegration/CustomBotWithProxyIntegrationCard.jsx

@@ -12,12 +12,17 @@ const CustomBotWithProxyIntegrationCard = (props) => {
         <h5 className="card-title font-weight-bold mt-3 ml-4">Slack</h5>
         <div className="card-body px-5">
           {props.slackWSNameInWithProxy.length !== 0 && (
-            <div className="card slack-work-space-name-card">
-              <div className="m-2 text-center">
-                <h5 className="font-weight-bold">{props.slackWSNameInWithProxy[0]}</h5>
-                <img width={20} height={20} src="/images/slack-integration/growi-bot-kun-icon.png" />
-              </div>
-            </div>
+            <>
+              {props.slackWSNameInWithProxy.map((slackWorkSpaceName) => {
+                return (
+                  <div key={slackWorkSpaceName} className="card slack-work-space-name-card">
+                    <div className="m-2 text-center">
+                      <h5 className="font-weight-bold">{slackWorkSpaceName}</h5>
+                      <img width={20} height={20} src="/images/slack-integration/growi-bot-kun-icon.png" />
+                    </div>
+                  </div>
+              )})}
+            </>
           )}
         </div>
       </div>