Skip to content

Commit

Permalink
fix: added reference to variables of use effect
Browse files Browse the repository at this point in the history
  • Loading branch information
FeroxFoxxo committed Aug 5, 2024
1 parent d0591bd commit 57dec43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/ui/engineer/SineGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function SineGraph(sineMatch) {
},
],
};
}, []);
}, [length]);

// Dynamic sine wave data
const dynamicData = useMemo(() => {
Expand All @@ -86,7 +86,7 @@ export default function SineGraph(sineMatch) {
},
],
};
}, [magnitude, phase, frequency]);
}, [magnitude, phase, frequency, length]);

// Chart options
const options = useMemo(() => ({
Expand Down Expand Up @@ -161,7 +161,7 @@ export default function SineGraph(sineMatch) {
console.log("User has matched sine curves!");
sineMatch();
}
},[magnitude, phase, frequency])
},[magnitude, phase, frequency, sineMatch, staticData])

return (
<div>
Expand Down

0 comments on commit 57dec43

Please sign in to comment.