(false)
-
- const onClickDropdown = () => setOpenDropdown(!openDropdown)
- const onChangeDisplayedAmount = () => setShowAmountOut(!showAmountOut)
return (
@@ -78,51 +30,34 @@ export default function TableHeader({
RATE
{!!currencyIn && !!currencyOut && (
<>
- {upToSmall ?
: ' '}({currencyIn?.symbol}/
+ {upToExtraSmall ?
: ' '}({currencyIn?.symbol}/
{currencyOut?.symbol})
>
)}
- {!upToSmall && (
-
- AMOUNT
- {!!currencyIn && (
- <>
- {upToSmall ?
: ' '}
- ({currencyIn?.symbol})
- >
- )}
-
- )}
-
-
-
- AMOUNT
- {!!currencyIn && !!currencyOut && (
- <>
- {upToSmall ?
: ' '}
- ({!upToSmall || showAmountOut ? currencyOut?.symbol : currencyIn?.symbol})
- >
- )}
-
- {upToSmall && }
-
- {upToSmall && (
-
-
-
- {currencyIn?.symbol}
-
-
- {currencyOut?.symbol}
- {' '}
-
-
+
+ AMOUNT
+ {!!currencyIn && (
+ <>
+ {upToExtraSmall ?
: ' '}
+ ({currencyIn?.symbol})
+ >
)}
-
+
- ORDER STATUS
+ AMOUNT
+ {!!currencyOut && (
+ <>
+ {upToExtraSmall ?
: ' '}
+ ({currencyOut?.symbol})
+ >
+ )}
+ {!upToExtraSmall && (
+
+ ORDER STATUS
+
+ )}
)
}
diff --git a/src/components/swapv2/LimitOrder/OrderBook/index.tsx b/src/components/swapv2/LimitOrder/OrderBook/index.tsx
index 0c2ae726e2..b20cd97e75 100644
--- a/src/components/swapv2/LimitOrder/OrderBook/index.tsx
+++ b/src/components/swapv2/LimitOrder/OrderBook/index.tsx
@@ -1,7 +1,7 @@
import { Currency, CurrencyAmount, Token } from '@kyberswap/ks-sdk-core'
import { Trans } from '@lingui/macro'
import { rgba } from 'polished'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { useCallback, useEffect, useMemo, useRef } from 'react'
import { useMedia } from 'react-use'
import { FixedSizeList } from 'react-window'
import { Text } from 'rebass'
@@ -59,8 +59,8 @@ const MarketPrice = styled.div`
display: grid;
grid-template-columns: 1fr 2fr 2fr 2fr 1fr;
- ${({ theme }) => theme.mediaWidth.upToSmall`
- grid-template-columns: 1.2fr 1.8fr 2fr 1fr;
+ ${({ theme }) => theme.mediaWidth.upToExtraSmall`
+ grid-template-columns: 1.2fr 1.8fr 2fr 1.8fr;
`}
`
@@ -184,8 +184,6 @@ export default function OrderBook() {
refetch: refetchMarketRate,
} = useBaseTradeInfoLimitOrder(makerCurrency, takerCurrency, chainId)
- const [showAmountOut, setShowAmountOut] = useState(true)
-
const ordersWrapperRef = useRef>(null)
const {
@@ -269,7 +267,7 @@ export default function OrderBook() {
)}
-
+
{formattedOrders.length > 0 ? (
{({ index, style }: { index: number; style: CSSProperties }) => {
const order = formattedOrders[index]
- return
+ return
}}
) : (
@@ -309,7 +307,7 @@ export default function OrderBook() {
>
{({ index, style }: { index: number; style: CSSProperties }) => {
const order = formattedReversedOrders[index]
- return
+ return
}}
) : (