From 57dec43c2efc5811b7794f7fca93bc3ed0386724 Mon Sep 17 00:00:00 2001 From: "feroxfoxxo@gmail.com" Date: Mon, 5 Aug 2024 16:36:33 +1200 Subject: [PATCH] fix: added reference to variables of use effect --- app/ui/engineer/SineGraph.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/ui/engineer/SineGraph.js b/app/ui/engineer/SineGraph.js index a854680..935aa51 100644 --- a/app/ui/engineer/SineGraph.js +++ b/app/ui/engineer/SineGraph.js @@ -66,7 +66,7 @@ export default function SineGraph(sineMatch) { }, ], }; - }, []); + }, [length]); // Dynamic sine wave data const dynamicData = useMemo(() => { @@ -86,7 +86,7 @@ export default function SineGraph(sineMatch) { }, ], }; - }, [magnitude, phase, frequency]); + }, [magnitude, phase, frequency, length]); // Chart options const options = useMemo(() => ({ @@ -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 (