Skip to content

Commit 81f6688

Browse files
committed
fix: add processing state to submit vote button (#1073)
Fixes #1052.
1 parent 994e526 commit 81f6688

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/namadillo/src/App/Governance/SubmitVote.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export const WithProposalId: React.FC<{ proposalId: bigint }> = ({
5757
data: voteTxData,
5858
isError,
5959
error: voteTxError,
60+
isPending: isPerformingTx,
6061
} = useAtomValue(createVoteTxAtom);
6162
const dispatchNotification = useSetAtom(dispatchToastNotificationAtom);
6263

@@ -191,10 +192,12 @@ export const WithProposalId: React.FC<{ proposalId: bigint }> = ({
191192
<ActionButton
192193
type="submit"
193194
disabled={
194-
!canVote.data || typeof selectedVoteType === "undefined"
195+
!canVote.data ||
196+
typeof selectedVoteType === "undefined" ||
197+
isPerformingTx
195198
}
196199
>
197-
Confirm
200+
{isPerformingTx ? "Processing..." : "Confirm"}
198201
</ActionButton>
199202
</Stack>
200203
)}

0 commit comments

Comments
 (0)