diff --git a/web/pages/simulator/index.tsx b/web/pages/simulator/index.tsx index a73d96a1..5f57f49d 100644 --- a/web/pages/simulator/index.tsx +++ b/web/pages/simulator/index.tsx @@ -9,7 +9,6 @@ import { Tooltip, Legend, } from 'chart.js' -import { ChartData } from 'chart.js' import { Line } from 'react-chartjs-2' import { bids as sampleBids } from '../../lib/simulator/sample-bids' import { Entry, makeEntries } from '../../lib/simulator/entries' @@ -147,15 +146,14 @@ function NewBidTable(props: { setNewBidType(newBidType === 'YES' ? 'NO' : 'YES') } - const nextEntry = useMemo(() => { - if (newBid) { - const nextBid = makeBid(newBidType, newBid) - const fakeBids = [...bids.slice(0, steps), nextBid] - const entries = makeEntries(fakeBids) - return entries[entries.length - 1] - } - return null - }, [newBid, newBidType, steps]) + let nextEntry: Entry | null = null + + if (newBid) { + const nextBid = makeBid(newBidType, newBid) + const fakeBids = [...bids.slice(0, steps), nextBid] + const entries = makeEntries(fakeBids) + nextEntry = entries[entries.length - 1] + } return (