codeforboston / maple

MAPLE makes it easy for anyone to view and submit testimony to the Massachusetts Legislature about the bills that will shape our future.
https://mapletestimony.org
MIT License
44 stars 118 forks source link

Fix follow button on browse testimony page #1632

Open LauraUmana opened 3 weeks ago

LauraUmana commented 3 weeks ago

Issue: #1621

The changes I made were:

  1. Added an event prevent default so it would no longer navigate to the next page
  2. I had to add a context to the follow button so I can bring state up.
  3. I also changed the queryResult of the useEffect in FollowButton.tsx to an object instead of a string. This way it can house all of the orgs I'm following and not following.

Checklist

Screenshots

Screenshot 2024-10-08 at 2 48 05 AM Screenshot 2024-10-08 at 2 49 43 AM

Known Issues

N/A

Steps to test/reproduce

  1. Go to the home page
  2. Click on Browse Testimony
  3. Click on a follow button for an organization like Pythagorean Pizza society
vercel[bot] commented 3 weeks ago

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

Name Status Preview Comments Updated (UTC)
maple-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 4:42am
LauraUmana commented 2 weeks ago

@kiminkim724 Hi Kimin! Thanks so much for the feedback. I made the changes to the PR.