From 3dae2e205abe22ed4277eaf1094e332bee9330be Mon Sep 17 00:00:00 2001 From: lianahus Date: Wed, 3 Aug 2022 11:21:24 +0200 Subject: [PATCH] added deps to useeffect --- libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index f1ba914eb9..fc4974b38e 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -47,7 +47,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { useEffect(() => { handleResize() - }) + }, ) useEffect(() => { window.addEventListener('resize', handleResize) @@ -55,7 +55,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { setTimeout(() => handleResize(), 2000) return () => window.removeEventListener('resize', handleResize) - }, []) + }, [state.debugging]) useEffect(() => { @@ -97,7 +97,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { } providerChanged() - }, [state.debugger]) + }, [state.debugger, state.isActive]) const listenToEvents = (debuggerInstance, currentReceipt) => { if (!debuggerInstance) return