-
Notifications
You must be signed in to change notification settings - Fork 0
feat: revamped homepage #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Deploying validator-voting-ui with
|
| Latest commit: |
ec17c86
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f834644c.validator-voting-ui.pages.dev |
| Branch Preview URL: | https://feat-home-v2.validator-voting-ui.pages.dev |
src/containers/vote/index.ts
Outdated
| setTotalVotedStakeAmount(Big(data[1])); | ||
| setVotedYeaStakeAmount(Big(data[0])); | ||
| setVotedStakeAmount(Big(data[1])); | ||
| setTotalVotedStakeAmount(Big(data[2])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the total stake amount, including what is not voted. I think totalStakeAmount will be more appropriate.
src/pages/details/index.tsx
Outdated
| const aVote = a.vote === 'yes' ? votes[a.accountId] || '0' : a.totalStakedBalance; | ||
| const bVote = b.vote === 'yes' ? votes[b.accountId] || '0' : b.totalStakedBalance; | ||
| const aVote = | ||
| a.vote === 'yes' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For either yes or no vote, we can get the voted stake amount from votes[accountId][1] now, since contract tracks stake amount for both yes and no.
src/pages/home/index.tsx
Outdated
| const currentProgressPercent = passed | ||
| ? 100 | ||
| : Math.round((votedPercentNum / targetPercent) * 100); | ||
| // const totalProgressPercentText = passed ? votedPercentNum : targetPercent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to remove the comment?
src/pages/home/index.tsx
Outdated
| {targetPercent}%{targetBadge} | ||
| <div className="flex w-0.5 left-1/2 h-[24px] -top-[32px] -translate-x-1/2 bg-[hsla(0,0%,12%,0.08)] absolute"></div> | ||
| </div> | ||
| {/* <div className="absolute" style={{ right: '0' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to remove the comment?
No description provided.