Procházet zdrojové kódy

fix typing jsx ChatInterface.tsx (#468)

wrapped with fragment
808vita před 1 rokem
rodič
revize
0e3c86ad59
1 změnil soubory, kde provedl 10 přidání a 5 odebrání
  1. 10 5
      frontend/src/components/ChatInterface.tsx

+ 10 - 5
frontend/src/components/ChatInterface.tsx

@@ -24,11 +24,16 @@ interface ITypingChatProps {
  */
 function TypingChat({ msg }: ITypingChatProps) {
   return (
-    msg?.content && (
-      <Card>
-        <CardBody>{useTypingEffect([msg?.content], { loop: false })}</CardBody>
-      </Card>
-    )
+    // eslint-disable-next-line react/jsx-no-useless-fragment
+    <>
+      {msg?.content && (
+        <Card>
+          <CardBody>
+            {useTypingEffect([msg?.content], { loop: false })}
+          </CardBody>
+        </Card>
+      )}
+    </>
   );
 }