Limit to 1 category on a card
This commit is contained in:
parent
ee213ddb84
commit
36ec981a37
|
@ -38,13 +38,13 @@ export function AbbrContractDetails(props: {
|
||||||
creatorName,
|
creatorName,
|
||||||
creatorUsername,
|
creatorUsername,
|
||||||
closeTime,
|
closeTime,
|
||||||
outcomeType,
|
|
||||||
tags,
|
tags,
|
||||||
} = contract
|
} = contract
|
||||||
const { volumeLabel } = contractMetrics(contract)
|
const { volumeLabel } = contractMetrics(contract)
|
||||||
const categories = tags.filter((tag) =>
|
// Show at most one category that this contract is tagged by
|
||||||
CATEGORY_LIST.includes(tag.toLowerCase())
|
const categories = CATEGORY_LIST.filter((category) =>
|
||||||
)
|
tags.map((t) => t.toLowerCase()).includes(category)
|
||||||
|
).slice(0, 1)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col className={clsx('gap-2 text-sm text-gray-500')}>
|
<Col className={clsx('gap-2 text-sm text-gray-500')}>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user