Refactor useEffect in WakeComponent.js
parent
2265676c81
commit
367db653f1
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue