diff --git a/src/display/ClueDisplay.tsx b/src/display/ClueDisplay.tsx index c13d16c..95654b3 100644 --- a/src/display/ClueDisplay.tsx +++ b/src/display/ClueDisplay.tsx @@ -11,9 +11,14 @@ interface Props { } const ClueDisplay = ({ activeClue }: Props) => { - const { start, segs } = useTimer(5000); + const onTimeout = () => { + socket.emit("clue-clock-timeout"); + }; + const { start, cancel, segs } = useTimer(5000, onTimeout); useEffect(() => { socket.on("clue-clock-on", start); + socket.on("contestant-buzzed", cancel); + socket.on("contestant-penalized", start); }, []); return ( <>