From e9b4ee7b98c4a6cbead4db19c019890ba2cd729f Mon Sep 17 00:00:00 2001 From: enzoggqs Date: Tue, 28 Feb 2023 21:12:46 -0300 Subject: [PATCH] Fix withdraw button behavior --- src/components/ListingComponent/ListingComponent.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/ListingComponent/ListingComponent.vue b/src/components/ListingComponent/ListingComponent.vue index 4e090e1..4bb2d1c 100644 --- a/src/components/ListingComponent/ListingComponent.vue +++ b/src/components/ListingComponent/ListingComponent.vue @@ -63,8 +63,17 @@ const callWithdraw = () => { emit("depositWithdrawn", withdrawAmount.value); }; +watch(enableConfirmButton, (): void => { + if (!enableConfirmButton.value) { + withdrawButtonOpacity.value = 0.7; + withdrawButtonCursor.value = "not-allowed"; + } else { + withdrawButtonOpacity.value = 1; + withdrawButtonCursor.value = "pointer"; + } +}); + watch(withdrawAmount, (): void => { - console.log(enableConfirmButton.value) if (!withdrawAmount.value || !enableConfirmButton.value) { withdrawButtonOpacity.value = 0.7; withdrawButtonCursor.value = "not-allowed";