mirror of
https://github.com/FlipsideCrypto/flipside-js.git
synced 2026-02-06 10:48:11 +00:00
Fix 0 point change issue in trend component.
This commit is contained in:
parent
1460964b33
commit
a038c9bb4f
@ -19,7 +19,7 @@ const Trend = (props: Props) => {
|
||||
if (changeDeterminate < 0) {
|
||||
directionClass = css.down;
|
||||
icon = require("./images/down.svg");
|
||||
} else {
|
||||
} else if (changeDeterminate > 0) {
|
||||
directionClass = css.up;
|
||||
icon = require("./images/up.svg");
|
||||
}
|
||||
@ -30,6 +30,11 @@ const Trend = (props: Props) => {
|
||||
} else {
|
||||
difference = calculateTrendDiff(props.value, props.change);
|
||||
}
|
||||
|
||||
if (!difference || difference === 0) {
|
||||
return <span />;
|
||||
}
|
||||
|
||||
const classes = classNames(css.wrapper, directionClass, props.class);
|
||||
|
||||
return (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user