Ver Fonte

change props type

Shun Miyazawa há 4 anos atrás
pai
commit
7f96843faa

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

@@ -11,10 +11,10 @@ const CustomBotWithProxyIntegrationCard = (props) => {
       <div className="card rounded shadow border-0 w-50 admin-bot-card">
       <div className="card rounded shadow border-0 w-50 admin-bot-card">
         <h5 className="card-title font-weight-bold mt-3 ml-4">Slack</h5>
         <h5 className="card-title font-weight-bold mt-3 ml-4">Slack</h5>
         <div className="card-body px-5">
         <div className="card-body px-5">
-          {props.slackWSNameInWithProxy != null && (
+          {props.slackWSNameInWithProxy[0] != null && (
             <div className="card slack-work-space-name-card">
             <div className="card slack-work-space-name-card">
               <div className="m-2 text-center">
               <div className="m-2 text-center">
-                <h5 className="font-weight-bold">{props.slackWSNameInWithProxy}</h5>
+                <h5 className="font-weight-bold">{props.slackWSNameInWithProxy[0]}</h5>
                 <img width={20} height={20} src="/images/slack-integration/growi-bot-kun-icon.png" />
                 <img width={20} height={20} src="/images/slack-integration/growi-bot-kun-icon.png" />
               </div>
               </div>
             </div>
             </div>
@@ -59,7 +59,7 @@ const CustomBotWithProxyIntegrationCard = (props) => {
           </div>
           </div>
         </div>
         </div>
         <div className="card-body p-4 mb-5 text-center">
         <div className="card-body p-4 mb-5 text-center">
-          <a className="btn btn-primary">{props.siteName}</a>
+          <a className="btn btn-primary">{props.siteName[0]}</a>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -67,8 +67,8 @@ const CustomBotWithProxyIntegrationCard = (props) => {
 };
 };
 
 
 CustomBotWithProxyIntegrationCard.propTypes = {
 CustomBotWithProxyIntegrationCard.propTypes = {
-  siteName: PropTypes.string.isRequired,
-  slackWSNameInWithProxy: PropTypes.string,
+  siteName: PropTypes.array.isRequired,
+  slackWSNameInWithProxy: PropTypes.array,
   isSlackScopeSet: PropTypes.bool.isRequired,
   isSlackScopeSet: PropTypes.bool.isRequired,
 };
 };
 
 

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

@@ -19,8 +19,8 @@ const CustomBotWithProxySettings = (props) => {
 
 
       {/* TODO delete tmp props */}
       {/* TODO delete tmp props */}
       <CustomBotWithProxyIntegrationCard
       <CustomBotWithProxyIntegrationCard
-        siteName="GROWI"
-        slackWSNameInWithProxy="SlackWorkSpaceName"
+        siteName={["siteName1", "siteName2"]}
+        slackWSNameInWithProxy={["wsName1", "wsName2"]}
         isSlackScopeSet
         isSlackScopeSet
       />
       />