Display "active clue"

This commit is contained in:
2023-02-14 11:45:39 -06:00
parent 48210b9efd
commit 87e85ed52f
9 changed files with 95 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
import { useEffect } from "react";
import { useParams } from "react-router-dom";
import { debounce } from "lodash";
import { debounce } from "./utils";
import { socket } from "./socket";
import { useAppSelector } from "./hooks";
import { selectCanBuzz, selectSignature } from "./store/contestantSlice";
@@ -16,15 +16,11 @@ const Contestant = () => {
socket.emit("contestant-join", { room, signature });
}, []);
const handleBuzz = debounce(
() => {
if (canBuzz) {
socket.emit("buzz");
}
},
1000,
{ leading: true, trailing: false }
);
const handleBuzz = debounce(() => {
if (canBuzz) {
socket.emit("buzz");
}
});
return (
<div>