Skip to content

Commit

Permalink
prevents effect from being re-ran on every render
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidypignatello committed May 25, 2020
1 parent 158d652 commit 788c7cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/component/app/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function App(props: Props) {
};
window.addEventListener('keydown', handleKeyPress);
return () => window.removeEventListener('keydown', handleKeyPress);
});
}, []);

useEffect(() => {
if (referredRewardAvailable && sanitizedReferrerParam && isRewardApproved) {
Expand Down

0 comments on commit 788c7cf

Please sign in to comment.