prevent double action

This commit is contained in:
Sara
2023-12-12 15:18:22 +01:00
parent 89dfda29a5
commit 5e7eeb8f24
6 changed files with 126 additions and 86 deletions

View File

@@ -38,9 +38,11 @@ const useParticipants = (transcriptId: string): UseParticipants => {
const [count, setCount] = useState(0);
const refetch = () => {
setCount(count + 1);
setLoading(true);
setErrorState(null);
if (!loading) {
setCount(count + 1);
setLoading(true);
setErrorState(null);
}
};
useEffect(() => {