Skip to content

Commit

Permalink
🐛 fix coloring of arrows for opposite-cost metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkjrs committed Mar 27, 2024
1 parent a2259e2 commit 8f67ad0
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions src/components/StatsHighlights.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,29 @@ export function StatsHighlights({
)}
>
{item.changeType === 'increase' ? (
<ArrowUpIcon
className="h-5 w-5 flex-shrink-0 self-center text-green-600 dark:text-green-400"
aria-hidden="true"
/>
!['CPM', 'CPC', 'CPV'].includes(item.name) ? (
<ArrowUpIcon
className="h-5 w-5 flex-shrink-0 self-center text-green-600 dark:text-green-400"
aria-hidden="true"
/>
) : (
<ArrowDownIcon
className="h-5 w-5 flex-shrink-0 self-center text-green-600 dark:text-green-400"
aria-hidden="true"
/>
)
) : item.changeType !== 'same' ? (
<ArrowDownIcon
className="h-5 w-5 flex-shrink-0 self-center text-red-600 dark:text-red-400"
aria-hidden="true"
/>
!['CPM', 'CPC', 'CPV'].includes(item.name) ? (
<ArrowDownIcon
className="h-5 w-5 flex-shrink-0 self-center text-red-600 dark:text-red-400"
aria-hidden="true"
/>
) : (
<ArrowUpIcon
className="h-5 w-5 flex-shrink-0 self-center text-red-600 dark:text-red-400"
aria-hidden="true"
/>
)
) : null}

<span className="sr-only">
Expand Down

0 comments on commit 8f67ad0

Please sign in to comment.