coopcycle / coopcycle-web

Logistics & marketplace platform. Only for worker-owned business.
https://coopcycle.org
Other
571 stars 130 forks source link

Address modal is rendered twice on the restaurant detail page (found locally) #4149

Closed Atala closed 1 month ago

Atala commented 7 months ago

Describe the bug Address modal is rendered twice on the restaurant detail page. I thought it was due to using react's strict mode but it doesn't seem so.

This is low priority I think, i just need a workaround in cypress tests.

To Reproduce Steps to reproduce the behavior:

  1. Go to restaurant page
  2. Add a product to the cart to trigger the opening of the address modal
  3. The component is rendered twice, you can search for example for "address-autosuggest__input" in the HTML inspector to find the two inputs

Expected behavior Modal is only rendered once

Screenshots

image

Paul-Eraman-CoopCycle commented 7 months ago

is this related to how it sometimes asks for the address multiple times?

Atala commented 7 months ago

I don't know, I don't think so. I think your problem is caused by some code asking automatically for the adress (the customer has already entered it but the program pushing the adress modal doesnt know)

Paul-Eraman-CoopCycle commented 7 months ago

ok thanks

Paul-Eraman-CoopCycle commented 1 month ago

Is this something that a user would notice @Atala ?

Atala commented 1 month ago

no the two modals are on top of each other and exactly the same

Paul-Eraman-CoopCycle commented 1 month ago

ok, then going to take out of the planning for the moment