From 95890c26b19d375169c5961452da1aefb77edfb6 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Mon, 10 Jan 2022 02:36:37 -0800 Subject: [PATCH] Set amount to 0 at button click if null --- frontend/src/components/BookPage.js | 2 +- frontend/src/components/MakerPage.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/BookPage.js b/frontend/src/components/BookPage.js index 17949a76..0941045f 100644 --- a/frontend/src/components/BookPage.js +++ b/frontend/src/components/BookPage.js @@ -223,7 +223,7 @@ export default class BookPage extends Component { { this.state.not_found ? "" : - You are {this.state.type == 0 ? " buying " : (this.state.type == 1 ? " selling ":" checking ")} BTC for {this.state.currencyCode} + You are {this.state.type == 0 ? selling : (this.state.type == 1 ? buying :" looking at all ")} BTC for {this.state.currencyCode} } diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js index d49286d8..a89fd95f 100644 --- a/frontend/src/components/MakerPage.js +++ b/frontend/src/components/MakerPage.js @@ -100,6 +100,8 @@ export default class MakerPage extends Component { } handleCreateOfferButtonPressed=()=>{ + this.state.amount == null ? this.setState({amount: 0}) : null; + console.log(this.state) const requestOptions = { method: 'POST',