Collapse train of thought when completed during live stream

This commit is contained in:
sabaimran 2024-11-29 18:10:35 -08:00
parent a0b00ce4a1
commit 512cf535e0

View file

@ -54,11 +54,11 @@ function TrainOfThoughtComponent(props: TrainOfThoughtComponentProps) {
const lastIndex = props.trainOfThought.length - 1;
const [collapsed, setCollapsed] = useState(props.completed);
// useEffect(() => {
// if (props.completed) {
// setCollapsed(true);
// }
// }), [props.completed];
useEffect(() => {
if (props.completed) {
setCollapsed(true);
}
}, [props.completed]);
return (
<div