Show more rows on daily movers all

This commit is contained in:
James Grugett 2022-09-17 18:00:24 -05:00
parent b74fd57912
commit 191ec9535c

View File

@ -26,10 +26,9 @@ export function ProbChangeTable(props: {
negativeChanges.findIndex((c) => c.probChanges.day > -threshold) + 1 negativeChanges.findIndex((c) => c.probChanges.day > -threshold) + 1
) )
const maxRows = Math.min(positiveChanges.length, negativeChanges.length) const maxRows = Math.min(positiveChanges.length, negativeChanges.length)
const rows = Math.min( const rows = full
full ? Infinity : 3, ? maxRows
Math.min(maxRows, countOverThreshold) : Math.min(3, Math.min(maxRows, countOverThreshold))
)
const filteredPositiveChanges = positiveChanges.slice(0, rows) const filteredPositiveChanges = positiveChanges.slice(0, rows)
const filteredNegativeChanges = negativeChanges.slice(0, rows) const filteredNegativeChanges = negativeChanges.slice(0, rows)
@ -55,7 +54,7 @@ export function ProbChangeTable(props: {
function ProbChangeRow(props: { contract: CPMMContract }) { function ProbChangeRow(props: { contract: CPMMContract }) {
const { contract } = props const { contract } = props
return ( return (
<Row className="items-center gap-4 hover:bg-gray-100"> <Row className="items-center justify-between gap-4 hover:bg-gray-100">
<SiteLink <SiteLink
className="p-4 pr-0 font-semibold text-indigo-700" className="p-4 pr-0 font-semibold text-indigo-700"
href={contractPath(contract)} href={contractPath(contract)}