Skip to content

Commit

Permalink
Merge pull request #160 from Moaguide-develop/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
kch2234 authored Nov 12, 2024
2 parents a7ce70d + 413f94d commit 4de1f5b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/product/TopProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ const TopProduct = memo(({ summary }: TopProductProps) => {

<div
className={`${
item.priceRate > 0
item.lastDivide_rate > 0
? 'text-red-500 bg-red-100'
: item.priceRate < 0
: item.lastDivide_rate < 0
? 'text-blue-500 bg-blue-100'
: 'text-gray-500 bg-gray-100'
} rounded-md w-auto h-[25px] flex justify-center items-center px-[4px] py-[4px] mr-[20px]`}>
{item.priceRate}%
{item.lastDivide_rate}%
</div>
</div>

Expand All @@ -136,16 +136,16 @@ const TopProduct = memo(({ summary }: TopProductProps) => {
</div>
<div
className={`ml-[3px] ${
item.lastDivide_rate > 0
item.priceRate > 0
? 'text-red-500'
: item.lastDivide_rate < 0
: item.priceRate < 0
? 'text-blue-500'
: 'text-gray-500'
}`}>
{item.lastDivide_rate > 0
? `(+ ${item.lastDivide_rate}%)`
: item.lastDivide_rate < 0
? `(${item.lastDivide_rate}%)`
{item.priceRate > 0
? `(+ ${item.priceRate}%)`
: item.priceRate < 0
? `(${item.priceRate}%)`
: `(0%)`}
</div>
</div>
Expand Down

0 comments on commit 4de1f5b

Please sign in to comment.