File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/components/dashboard/platform Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ export const TopPerformanceList = memo(function TopPerformanceList({
3232 name : item . provider ,
3333 logo : null ,
3434 } ;
35- const diffRate = item . diffRate ?? 0 ;
36- const isUp = diffRate >= 0 ;
3735
3836 return (
3937 < div key = { item . provider } className = "flex items-center gap-4 w-full" >
@@ -50,10 +48,12 @@ export const TopPerformanceList = memo(function TopPerformanceList({
5048 < span className = "font-heading4 text-text-main tabular-nums whitespace-nowrap" >
5149 { item . roas . toFixed ( 2 ) } %
5250 </ span >
53- < TrendBadge
54- direction = { isUp ? "up" : "down" }
55- value = { `${ Math . abs ( diffRate ) } %` }
56- />
51+ { item . diffRate !== null && item . diffRate !== 0 && (
52+ < TrendBadge
53+ direction = { item . diffRate > 0 ? "up" : "down" }
54+ value = { `${ Math . abs ( item . diffRate ) } %` }
55+ />
56+ ) }
5757 </ div >
5858 </ div >
5959 ) ;
You can’t perform that action at this time.
0 commit comments