Skip to content
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

fix: add hint if no voting power #5622

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="typescript">
import { Button, Text, FontWeight, TextType, KeyValueBox } from 'shared/components'
import { Button, Text, FontWeight, TextHint, TextType, KeyValueBox } from 'shared/components'
import { HTMLButtonType } from 'shared/components/enums'
import { selectedAccount } from '@core/account/stores'
import { localize } from '@core/i18n'
Expand Down Expand Up @@ -46,6 +46,9 @@
</Text>
<div class="space-y-4">
<KeyValueBox keyText={localize('popups.voteForProposal.key')} valueText={formattedVotingPower} />
{#if !hasVotingPower}
<TextHint danger text={localize('popups.voteForProposal.noVotingPower')} />
{/if}
</div>
<popup-buttons class="flex flex-row flex-nowrap w-full space-x-4">
<Button classes="w-full" outline onClick={closePopup}>{localize('actions.cancel')}</Button>
Expand Down
1 change: 0 additions & 1 deletion packages/shared/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,6 @@
"title": "Vote for proposal",
"body": "You're about to vote for {proposal} proposal.",
"key": "Your voting power",
"hint": "Please note that your voting power depends on the amount of funds you hold in your wallet. The more funds you hold, the higher your voting power is.",
"noVotingPower": "You do not have any voting power. Please increase your voting power from the Governance dashboard."
},
"revote": {
Expand Down