snapshot-labs / sx-monorepo

Snapshot X monorepo
https://docs.snapshotx.xyz
MIT License
11 stars 10 forks source link

fix: ButtonFollow loading state should be per button #367

Closed wa0x6e closed 1 month ago

wa0x6e commented 1 month ago

Summary

Currently, when we follow/unfollow a space, the ButtonFollow will switch to a loading state.

The loading state is currently global to the store, thus switching all the ButtonFollow to the loading state

This PR will "localize" the loading state to each button, so only the relevant button will switch to the loading state when necessary.

How to test

  1. Go to explore page
  2. Click on a follow space button
  3. The button should switch to the loading state, until you sign or reject the tx
  4. All the other follow button should not have the loading state.