From 3113a243748da3223d8ad0a8ef4bcbd87e82feb6 Mon Sep 17 00:00:00 2001 From: Emily Drake Smith Date: Fri, 27 Dec 2024 12:13:31 -0500 Subject: [PATCH] simplify code to change ticker background color --- .../Futa/SearchableTicker/TickerItem.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/Futa/SearchableTicker/TickerItem.tsx b/src/components/Futa/SearchableTicker/TickerItem.tsx index 134ca15bb4..a48f05061a 100644 --- a/src/components/Futa/SearchableTicker/TickerItem.tsx +++ b/src/components/Futa/SearchableTicker/TickerItem.tsx @@ -195,16 +195,12 @@ export default function TickerItem(props: PropsIF) { styles.ticker_item, // add background highlighting when ticker is active // ... or when hovered - !isAccount - ? // ? (auction?.ticker === selectedTicker - // ? styles.active : styles.inactive - // ) - styles[ - auction?.ticker === selectedTicker - ? 'active' - : 'inactive' - ] - : '', + isAccount || + styles[ + auction?.ticker === selectedTicker + ? 'active' + : 'inactive' + ], ].join(' ')} to={'/auctions/v1/' + ticker} onClick={() => {