haxxnz / vaxxnz

NZ COVID Vaccination Finder - community project
https://vaxx.nz
MIT License
82 stars 44 forks source link

fixed bug where an incorrect link was provided for walk in locations #333

Closed J-eld closed 2 years ago

J-eld commented 2 years ago

fixes #332

Proposed Changes

  1. modalPath function was being provided the incorrect index number

Additional Info.

The index number provided to modalPath() did not match the index of that record in the original locations object. The locations.ok array is now being parsed with findIndex to get the correct index to pass into modalPath

Screenshots (optional)

netlify[bot] commented 2 years ago

✔️ Deploy Preview for vaxxnz ready!

🔨 Explore the source changes: c4fc13648929120c1e10f0ba27d67ed3ff05c728

🔍 Inspect the deploy log: https://app.netlify.com/sites/vaxxnz/deploys/61e517e9a651c30009dc18c7

😎 Browse the preview: https://deploy-preview-333--vaxxnz.netlify.app/

noway commented 2 years ago

I'll review it in the evening

tingeypa commented 2 years ago

Running side by side, the preview site shows the correct links, the production site shows the existing issue. 👍

noway commented 2 years ago

Can reproduce. Your patch fixes it, and the fix makes sense to me. Nice work 👍🏻