From 8bcd6e0677c7b2b19fa2179e5227d65340d3fac5 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 26 Mar 2024 21:41:10 -0600 Subject: [PATCH] :recycle: refactor to abstract costBasedMetrics --- src/components/StatsHighlights.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/StatsHighlights.tsx b/src/components/StatsHighlights.tsx index b40c9c8..faf4ebe 100644 --- a/src/components/StatsHighlights.tsx +++ b/src/components/StatsHighlights.tsx @@ -7,6 +7,8 @@ import { CampaignStatsData } from '@tincre/promo-types'; import { ArrowDownIcon, ArrowUpIcon } from '@heroicons/react/20/solid'; import { YouTubeIcon } from './YouTubeIcon'; + +const costBasedMetrics = ['CPM', 'CPC', 'CPV']; /* @ts-ignore */ function classNames(...classes) { return classes.filter(Boolean).join(' '); @@ -80,7 +82,7 @@ export function StatsHighlights({ )} > {item.changeType === 'increase' ? ( - !['CPM', 'CPC', 'CPV'].includes(item.name) ? ( + !costBasedMetrics.includes(item.name) ? (