diff --git a/libs/market-depth/src/lib/orderbook.tsx b/libs/market-depth/src/lib/orderbook.tsx
index 4b0d9130e..5b001c648 100644
--- a/libs/market-depth/src/lib/orderbook.tsx
+++ b/libs/market-depth/src/lib/orderbook.tsx
@@ -1,7 +1,6 @@
import styles from './orderbook.module.scss';
import {
- Fragment,
useEffect,
useLayoutEffect,
useRef,
@@ -24,7 +23,7 @@ interface OrderbookProps extends OrderbookData {
onResolutionChange: (resolution: number) => void;
}
-const horizontalLine = (top: string, testId: string) => (
+const HorizontalLine = ({ top, testId }: { top: string; testId: string }) => (
+ {data.map((data, i) => (
+
+ ))}
+
+ ) : null;
return (
{t('Ask vol')}
{t('Cumulative vol')}
-
- {hasData ? (
-
- {renderedRows.data?.map((data) => {
- return (
-
-
-
- );
- })}
-
- ) : (
+ {tableBody || (
{t('No data')}
@@ -387,30 +378,32 @@ export const Orderbook = ({
{maxPriceLevel &&
bestStaticBidPrice &&
BigInt(bestStaticBidPrice) < BigInt(maxPriceLevel) &&
- BigInt(bestStaticBidPrice) > minPriceLevel &&
- horizontalLine(
- `${(
- ((BigInt(maxPriceLevel) - BigInt(bestStaticBidPrice)) /
- BigInt(resolution) +
- BigInt(1)) *
- BigInt(rowHeight) -
- BigInt(3)
- ).toString()}px`,
- 'best-static-bid-price'
+ BigInt(bestStaticBidPrice) > minPriceLevel && (
+
)}
{maxPriceLevel &&
bestStaticOfferPrice &&
BigInt(bestStaticOfferPrice) <= BigInt(maxPriceLevel) &&
- BigInt(bestStaticOfferPrice) > minPriceLevel &&
- horizontalLine(
- `${(
- ((BigInt(maxPriceLevel) - BigInt(bestStaticOfferPrice)) /
- BigInt(resolution) +
- BigInt(2)) *
- BigInt(rowHeight) -
- BigInt(3)
- ).toString()}px`,
- 'best-static-offer-price'
+ BigInt(bestStaticOfferPrice) > minPriceLevel && (
+
)}
);