PrimeAcademy / biscayne-syllabus

1 stars 4 forks source link

location data is not passing properly to my search #10

Closed NekkidBear closed 1 month ago

NekkidBear commented 1 month ago

Description

Your Real Name Jason

What do you want to happen? This was working on Friday. The expected behavior is that when the user logs in, the map shows some restaurants near them based on their browser location or failing that, the location configured in the user profile. Once they have created/selected a group, the same component will be called to display the results of the aggregate criteria search.

What is happening? I'm running into some asynchronous update issues. I set a heading that reads 'new aggregate preferences' and updates the value dynamically. That works. however, when I pass the city and state to the server for normalization and searching, the "aggregate preferences" variable shows an empty object, causing downstream errors. I've noticed that if the page is loaded and I do something to make a change on the page, it re-renders, and the value updates momentarily. however, once I refresh the page, or log out and back in as another user, the values aren't updating and return empty objects/arrays.

Screenshots / Code Snippets

![Screenshot 2024-05-28 at 1 33 00 PM](https://github.com/PrimeAcademy/biscayne-syllabus/assets/52714446/7d0d178

Screenshot 2024-05-28 at 1 41 06 PM

Screenshot 2024-05-28 at 1 41 06 PM 2 2-5090-4eac-8f57-e51b9c1c0da6)

What did you try? Who did you ask?

I've been googling and adding console logs, but I feel like I'm rabbit-holing and going around in circles. The restaurant list is the crux of the project though, so I need to at least be able to return some kind of results.

What branch is your code on? Did you git push?

I'm working on featureGroupSearch. I just committed and synced before filing the issue

When was the last time you took a break?

At lunchtime; I'm getting ready to take another.

matthew-black commented 1 month ago

Currently working through quite a few breadcrumbs! :)