diff --git a/shared/js/ui/frames/side/ConversationUI.tsx b/shared/js/ui/frames/side/ConversationUI.tsx index c82df245..28018c8b 100644 --- a/shared/js/ui/frames/side/ConversationUI.tsx +++ b/shared/js/ui/frames/side/ConversationUI.tsx @@ -320,7 +320,7 @@ const PartnerTypingIndicator = (props: { events: Registry, return (
- Partner is typing + Partner is typing
) }; diff --git a/shared/js/ui/react-elements/LoadingDots.tsx b/shared/js/ui/react-elements/LoadingDots.tsx index ea065a7c..67c933b5 100644 --- a/shared/js/ui/react-elements/LoadingDots.tsx +++ b/shared/js/ui/react-elements/LoadingDots.tsx @@ -1,7 +1,7 @@ import {useEffect, useState} from "react"; import * as React from "react"; -export const LoadingDots = (props: { maxDots?: number, speed?: number, textOnly?: boolean }) => { +export const LoadingDots = (props: { maxDots?: number, speed?: number, textOnly?: boolean, enabled?: boolean }) => { let { maxDots, speed } = props; if(!maxDots || maxDots < 1) maxDots = 3; @@ -9,6 +9,9 @@ export const LoadingDots = (props: { maxDots?: number, speed?: number, textOnly? const [dots, setDots] = useState(0); useEffect(() => { + if(!props.enabled) + return; + const timeout = setTimeout(() => setDots(dots + 1), speed || 500); return () => clearTimeout(timeout); }); @@ -19,5 +22,6 @@ export const LoadingDots = (props: { maxDots?: number, speed?: number, textOnly? if(props.textOnly) return <>{result}; + return
{result}
; }; \ No newline at end of file