Skip to content

Commit

Permalink
fix send btn multiple clicks (#3746)
Browse files Browse the repository at this point in the history
* add disable submit btn right after form is submitted

* move btn disable before async funcs
  • Loading branch information
amiraabouhadid authored Dec 15, 2024
1 parent 2f2d755 commit 6fb2ab7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/playground/src/dashboard/transfer_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ async function transfer(recipientTwin: Twin) {
}
}
async function submitFormAddress() {
isValidAddressTransfer.value = false;
loadingAddressTransfer.value = true;
await transfer(recepTwinFromAddress.value!);
loadingAddressTransfer.value = false;
Expand All @@ -233,6 +234,7 @@ function createInvalidTransferToast(message: string) {
createCustomToast(message, ToastType.danger);
}
async function submitFormTwinID() {
isValidTwinIDTransfer.value = false;
if (gridStore) {
const twinDetails = await gridStore.client.twins.get({
id: parseInt(recipientTwinId.value.trim()),
Expand Down

0 comments on commit 6fb2ab7

Please sign in to comment.