diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightItem.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightItem.tsx index 439fcee32..d8cf51a88 100644 --- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightItem.tsx +++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightItem.tsx @@ -1,6 +1,7 @@ import { IssueCategory } from 'App/types/filter/filterType'; import React from 'react'; import { Icon } from 'UI'; +import cn from 'classnames'; interface Props { item: any; @@ -27,6 +28,25 @@ function InsightItem(props: Props) { export default InsightItem; + +function Change({ change, isIncreased }: any) { + return ( +
+ + {change}% +
+ ); +} + function ErrorItem({ item, className, onClick }: any) { return (
@@ -43,7 +63,7 @@ function ErrorItem({ item, className, onClick }: any) {
Increase
in
{item.name}
-
{item.change}%
+ )}
@@ -57,7 +77,7 @@ function NetworkItem({ item, className, onClick }: any) {
Network request
{item.name}
{item.change > 0 ? 'increased' : 'decreased'}
-
{item.change}%
+ ); } @@ -69,7 +89,7 @@ function ResourcesItem({ item, className, onClick }: any) {
{item.change > 0 ? 'Inrease' : 'Decrease'}
in
{item.name}
-
{item.change}%
+ ); } @@ -86,7 +106,7 @@ function RageItem({ item, className, onClick }: any) { {!item.isNew && ( <>
increase by
-
{item.change}
+ )}