diff --git a/src/hooks/active_address.ts b/src/hooks/active_address.ts index d3cfff2..6e507ab 100644 --- a/src/hooks/active_address.ts +++ b/src/hooks/active_address.ts @@ -54,7 +54,7 @@ export async function useSyncAddress() { removeEventListener("focus", sync); }; })(); - }, [strategy]); + }, [strategy, dispatch]); } /** diff --git a/src/hooks/profile.ts b/src/hooks/profile.ts index 1fd14d9..e77a0f7 100644 --- a/src/hooks/profile.ts +++ b/src/hooks/profile.ts @@ -9,7 +9,7 @@ export default function useProfileModal() { useEffect(() => { if (state.activeStrategy || state.activeModal !== "profile") return; dispatch({ type: "CLOSE_MODAL" }); - }, [state]); + }, [state, dispatch]); return { setOpen(val: boolean) { diff --git a/src/modals/Profile.tsx b/src/modals/Profile.tsx index 027e38e..39a8d50 100644 --- a/src/modals/Profile.tsx +++ b/src/modals/Profile.tsx @@ -25,7 +25,7 @@ export function ProfileModal() { useEffect(() => { if (modalController.open) return; dispatch({ type: "CLOSE_MODAL" }); - }, [modalController.open]); + }, [modalController.open, dispatch]); function onClose() { dispatch({ type: "CLOSE_MODAL" });