coopcycle-web icon indicating copy to clipboard operation
coopcycle-web copied to clipboard

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

Open Atala opened this issue 1 year ago • 3 comments

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 <AddressModal> 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

Atala avatar Apr 16 '24 13:04 Atala

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

Paul-Eraman-CoopCycle avatar Apr 16 '24 14:04 Paul-Eraman-CoopCycle

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)

Atala avatar Apr 16 '24 14:04 Atala

ok thanks

Paul-Eraman-CoopCycle avatar Apr 16 '24 14:04 Paul-Eraman-CoopCycle