carlosvegap / capstone-kickoff

0 stars 0 forks source link

reacting to click on list and map view #85

Closed CarLosVegga closed 1 year ago

CarLosVegga commented 1 year ago

Hi everyone!

Here is a small demo on a small feature I added

https://user-images.githubusercontent.com/60989884/184000904-5d26056d-638d-4f5a-be03-da8ee450feb0.mov

Now the user can switch between restaurants if they click on a marker or on a card of the list

For controlling which restaurant I was displaying, I had an index at ExperienceInfo.jsx. I decided to move that up to Adventurer.jsx and pass down the value and setter of that to the rest of the components. After that, I just included the function onClick, and since it is being rendered within a map I only had to use the index of that map function from the list and map view.