-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix / checkout issues #312
Conversation
Visit the preview URL for this PR (updated for commit afc09b7): https://ottwebapp--pr312-fix-checkout-issues-bydwdvyk.web.app (expires Wed, 12 Jul 2023 09:11:13 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c198f8a3a199ba8747819f7f1e45cf602b777529 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@AntonLantukh @kiremitrov123 if we merge this PR, we don't need to change the target branch in #313 |
Description
This PR fixes two problems. The first problem was an infinite render loop when opening the choose offers modal. This was caused by using a default value as react-query data. This becomes an issue when the same variable becomes a dependency in a useEffect/useMemo.
The second change fixes a React hook violation. This probably wasn't an issue before because it didn't use any hooks internally, but we've added a
useMemo
hook to ... ironically ... also prevent infinite render loops.