Refactor useEffect in WakeComponent.js

master
Tudor Stanciu 2024-03-31 22:07:02 +03:00
parent 2265676c81
commit 367db653f1
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,9 @@ const WakeComponent = ({ machine, addLog, disabled }) => {
); );
}, [machine, log, pingInterval, disabled]); }, [machine, log, pingInterval, disabled]);
useEffect(pingInLoop, [trigger, pingInLoop]); useEffect(() => {
pingInLoop();
}, [trigger, pingInLoop]);
const handleWakeClick = event => { const handleWakeClick = event => {
wakeMachine(); wakeMachine();