Skip to content

Commit

Permalink
fix: dispatch dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
martonlederer committed Jan 8, 2023
1 parent 9020bc3 commit 3c7a88e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hooks/active_address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function useSyncAddress() {
removeEventListener("focus", sync);
};
})();
}, [strategy]);
}, [strategy, dispatch]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/modals/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" });
Expand Down

0 comments on commit 3c7a88e

Please sign in to comment.