Skip to content
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

Merged
merged 3 commits into from
Jun 20, 2023
Merged

Fix / checkout issues #312

merged 3 commits into from
Jun 20, 2023

Conversation

ChristiaanScheermeijer
Copy link
Collaborator

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.

image

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.

image

@ChristiaanScheermeijer ChristiaanScheermeijer added the bug Something isn't working label Jun 8, 2023
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

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

Copy link
Collaborator

@kiremitrov123 kiremitrov123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ChristiaanScheermeijer
Copy link
Collaborator Author

@AntonLantukh @kiremitrov123 if we merge this PR, we don't need to change the target branch in #313

@dbudzins dbudzins merged commit ca4d3bf into develop Jun 20, 2023
@ChristiaanScheermeijer ChristiaanScheermeijer deleted the fix/checkout-issues branch June 21, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants