Quellcode durchsuchen

clean code for BotTypeCard

reiji-h vor 2 Jahren
Ursprung
Commit
9731002963

+ 2 - 3
apps/app/src/components/Admin/SlackIntegration/BotTypeCard.tsx

@@ -36,7 +36,7 @@ type BotTypeCardProps = {
   onBotTypeSelectHandler: (botType: SlackbotType) => void,
   onBotTypeSelectHandler: (botType: SlackbotType) => void,
 };
 };
 
 
-const BotTypeCard = (props: BotTypeCardProps): JSX.Element => {
+export const BotTypeCard = (props: BotTypeCardProps): JSX.Element => {
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
   const { isActive, botType, onBotTypeSelectHandler } = props;
   const { isActive, botType, onBotTypeSelectHandler } = props;
@@ -109,7 +109,6 @@ const BotTypeCard = (props: BotTypeCardProps): JSX.Element => {
       </div>
       </div>
     </div>
     </div>
   );
   );
-
 };
 };
 
 
-export default BotTypeCard;
+BotTypeCard.displayName = 'BotTypeCard';

+ 1 - 1
apps/app/src/components/Admin/SlackIntegration/SlackIntegration.tsx

@@ -10,7 +10,7 @@ import {
 import { toastSuccess, toastError } from '~/client/util/toastr';
 import { toastSuccess, toastError } from '~/client/util/toastr';
 import { LoadingSpinner } from '~/components/LoadingSpinner';
 import { LoadingSpinner } from '~/components/LoadingSpinner';
 
 
-import BotTypeCard from './BotTypeCard';
+import { BotTypeCard } from './BotTypeCard';
 import ConfirmBotChangeModal from './ConfirmBotChangeModal';
 import ConfirmBotChangeModal from './ConfirmBotChangeModal';
 import CustomBotWithProxySettings from './CustomBotWithProxySettings';
 import CustomBotWithProxySettings from './CustomBotWithProxySettings';
 import CustomBotWithoutProxySettings from './CustomBotWithoutProxySettings';
 import CustomBotWithoutProxySettings from './CustomBotWithoutProxySettings';