nance-eth / nance-interface

An Interface of Nance platform
https://nance.app
4 stars 0 forks source link

refresh vote data after user submits vote #139

Open jigglyjams opened 4 months ago

jigglyjams commented 4 months ago

refetch the vote data so all the percentages and quorum is proper after the user submits their vote

twodam commented 4 months ago

it can refetch vote list https://github.com/nance-eth/nance-interface/blob/2657e69bdce9f5522e139ba5984f4e49999fbf5b/components/Vote/VotingModal.tsx#L61-L65 https://github.com/nance-eth/nance-interface/blob/2657e69bdce9f5522e139ba5984f4e49999fbf5b/components/Proposal/ProposalVotes.tsx#L45-L50

oh, I think the VotesBar is using data from proposalInfo which didn't refetch upon new vote. I should find a way to trigger refetch in https://github.com/nance-eth/nance-interface/blob/2657e69bdce9f5522e139ba5984f4e49999fbf5b/pages/s/%5Bspace%5D/%5Bproposal%5D.tsx#L33-L35