File size: 476 Bytes
876cc3e
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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;
}