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