From 83899f96a18df7f2abf782a11c8329a50f88b514 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 7 Dec 2021 10:26:57 -0800 Subject: [PATCH] Preview bid results; toggle bid type --- web/pages/simulator/index.tsx | 41 ++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/web/pages/simulator/index.tsx b/web/pages/simulator/index.tsx index eda62127..c1b5fefd 100644 --- a/web/pages/simulator/index.tsx +++ b/web/pages/simulator/index.tsx @@ -71,8 +71,8 @@ function toRowStart(entry: Entry) { } } -function toRowEnd(entry: Entry) { - if (!entry.yesBid && !entry.noBid) { +function toRowEnd(entry: Entry | null) { + if (!entry) { return ( N/A @@ -114,6 +114,9 @@ function toRowEnd(entry: Entry) { function newBidTable( steps: number, newBid: number, + nextEntryElement: JSX.Element, + newBidType: String, + toggleBidType: () => void, setNewBid: (newBid: number) => void, submitBid: () => void ) { @@ -137,16 +140,20 @@ function newBidTable(
YES

NO
@@ -166,7 +173,7 @@ function newBidTable( onFocus={(e) => e.target.select()} /> - {/* */} + {nextEntryElement}