// Invisible stopper. Some Chainlit versions do not unmount a removed element on
// update, so the TurnTimer can keep counting after the turn is done. This mounts
// with the final reply and flips a global flag the timer polls.
import { useEffect } from "react";

export default function TimerStop() {
  useEffect(() => {
    window.__fossilTimerStopped = window.__fossilTimerStopped || {};
    window.__fossilTimerStopped[props.id] = true;
  }, [props.id]);
  return null;
}
