Переглянути джерело

using default to show official bot card text

kaori 5 роки тому
батько
коміт
5f41036b31

+ 16 - 11
src/client/js/components/Admin/SlackIntegration/BotTypeCard.jsx

@@ -36,15 +36,15 @@ const BotTypeCard = (props) => {
   let botDetails = {};
   let botDetails = {};
 
 
   switch (props.botType) {
   switch (props.botType) {
-    case 'official-bot':
-      botDetails = {
-        botType: 'official-bot',
-        botTypeCategory: 'official_bot',
-        setUp: 'easy',
-        multiWSIntegration: 'possible',
-        securityControl: 'impossible',
-      };
-      break;
+    // case 'official-bot':
+    //   botDetails = {
+    //     botType: 'official-bot',
+    //     botTypeCategory: 'official_bot',
+    //     setUp: 'easy',
+    //     multiWSIntegration: 'possible',
+    //     securityControl: 'impossible',
+    //   };
+    //   break;
     case 'customBotWithoutProxy':
     case 'customBotWithoutProxy':
       botDetails = {
       botDetails = {
         botType: 'custom-bot-without-proxy',
         botType: 'custom-bot-without-proxy',
@@ -67,6 +67,11 @@ const BotTypeCard = (props) => {
       break;
       break;
     default:
     default:
       botDetails = {
       botDetails = {
+        botType: 'official-bot',
+        botTypeCategory: 'official_bot',
+        setUp: 'easy',
+        multiWSIntegration: 'possible',
+        securityControl: 'impossible',
       };
       };
       break;
       break;
   }
   }
@@ -82,7 +87,7 @@ const BotTypeCard = (props) => {
     >
     >
       <div>
       <div>
         <h3 className={`card-header mb-0 py-3
         <h3 className={`card-header mb-0 py-3
-              ${props.botType === 'official-bot' ? 'd-flex align-items-center justify-content-center' : 'text-center'}
+              ${props.botType === 'officialBot' ? 'd-flex align-items-center justify-content-center' : 'text-center'}
               ${props.isActive ? 'bg-primary text-light' : ''}`}
               ${props.isActive ? 'bg-primary text-light' : ''}`}
         >
         >
           <span className="mr-2">
           <span className="mr-2">
@@ -90,7 +95,7 @@ const BotTypeCard = (props) => {
           </span>
           </span>
 
 
           {/* official bot card is shown recommended badge, Custom bot cards are shown supplementary bot name  */}
           {/* official bot card is shown recommended badge, Custom bot cards are shown supplementary bot name  */}
-          {props.botType === 'official-bot'
+          {props.botType === 'officialBot'
           ? (
           ? (
             <span className="badge badge-info mr-2">
             <span className="badge badge-info mr-2">
               {t('admin:slack_integration.selecting_bot_types.recommended')}
               {t('admin:slack_integration.selecting_bot_types.recommended')}