Skip to content

Commit

Permalink
replace ternary with if/else statements
Browse files Browse the repository at this point in the history
  • Loading branch information
kianamcc committed Nov 12, 2024
1 parent d5cbbb0 commit 7b774f6
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,16 @@ function _CardContainer(props: CardContainerProps) {
const isReleaseCardMediumList =
type === RELEASE_CARD && rest.releaseCardConfig?.cardSize === 'medium'

let cardListSx = defaultListSx
if (isReleaseCardMediumList) {
cardListSx = releaseCardMediumListSx
} else if (multiCardList && isMultipleCards) {
cardListSx = multiCardListSx
}

return (
<>
<Box
role="list"
sx={
isReleaseCardMediumList
? releaseCardMediumListSx
: multiCardList && isMultipleCards
? multiCardListSx
: defaultListSx
}
>
<Box role="list" sx={cardListSx}>
{title && <h2 className="SRC-card-overview-title">{title}</h2>}
{!title && unitDescription && (
<TotalQueryResults frontText={'Displaying'} />
Expand Down

0 comments on commit 7b774f6

Please sign in to comment.