Enable negative growth in WooCommerce delta
[MAILPOET-5405]
This commit is contained in:
@@ -80,7 +80,8 @@ function getWooCommerceDelta(type: 'revenue' | 'orders'): number | undefined {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (newValue / previous) * 100;
|
||||
const delta = (newValue / previous) * 100;
|
||||
return current > previous ? delta : delta * -1;
|
||||
}
|
||||
|
||||
export function Overview(): JSX.Element | null {
|
||||
|
Reference in New Issue
Block a user