lloydzhou 1 éve
szülő
commit
c00ebbea4f
1 módosított fájl, 1 hozzáadás és 2 törlés
  1. 1 2
      app/components/realtime-chat/realtime-chat.tsx

+ 1 - 2
app/components/realtime-chat/realtime-chat.tsx

@@ -106,7 +106,6 @@ export function RealtimeChat({
           }
         } catch (error) {
           console.error("Set message failed:", error);
-          setStatus("Set message failed");
         }
       } catch (error) {
         console.error("Connection failed:", error);
@@ -303,7 +302,7 @@ export function RealtimeChat({
             icon={isRecording ? <VoiceOffIcon /> : <VoiceIcon />}
             onClick={toggleRecording}
             disabled={!isConnected}
-            type={isRecording ? "danger" : "primary"}
+            type={isRecording ? "danger" : isConnected ? "primary" : null}
           />
         </div>
         <div className={styles["icon-center"]}>{status}</div>