cornellh4i / lagos-volunteers

Lagos Food Bank Volunteer Management System
https://lagos-volunteers.vercel.app
MIT License
13 stars 6 forks source link

Fix edit page refresh #257

Closed ArushiAggarwal closed 4 months ago

ArushiAggarwal commented 5 months ago

Summary

We added UpdateEventData that had the latest information in order to populate the data with since it was returning response in which structure of response might not match what React Query expects. We then used UpdateEventData in the onSuccess function and switched it from invalidateQueries to setQueryData so we update the corresponding query in the React Query cache.

Testing

We created a fake event calling Testing event bug that allowed us to experiment and test our code with the edit event function. We also created console.log comments to for updatedEventData to see if the right data was being passed through.

Notes

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lagos-volunteers ✅ Ready (Inspect) Visit Preview May 5, 2024 2:31am