This commit is contained in:
parent
424061d64c
commit
0f5b712034
@ -18,8 +18,9 @@ export interface PriceChangeCellProps {
|
|||||||
export const PriceChangeCell = memo(
|
export const PriceChangeCell = memo(
|
||||||
forwardRef<HTMLSpanElement, PriceChangeCellProps>(
|
forwardRef<HTMLSpanElement, PriceChangeCellProps>(
|
||||||
({ candles, decimalPlaces }: PriceChangeCellProps, ref) => {
|
({ candles, decimalPlaces }: PriceChangeCellProps, ref) => {
|
||||||
const change = priceChange(candles);
|
const validCandles = candles.filter((c) => c !== '');
|
||||||
const changePercentage = priceChangePercentage(candles);
|
const change = priceChange(validCandles);
|
||||||
|
const changePercentage = priceChangePercentage(validCandles);
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
@ -32,7 +32,8 @@ export const Last24hPriceChange = ({
|
|||||||
return nonIdeal;
|
return nonIdeal;
|
||||||
}
|
}
|
||||||
|
|
||||||
const candles = oneDayCandles?.map((c) => c.close) || [];
|
const candles =
|
||||||
|
oneDayCandles.map((c) => c.close).filter((c) => c !== '') || [];
|
||||||
const change = priceChange(candles);
|
const change = priceChange(candles);
|
||||||
const changePercentage = priceChangePercentage(candles);
|
const changePercentage = priceChangePercentage(candles);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user