import useOraclePrice from '../hooks/useOraclePrice' import { formatUsdValue } from '../utils' import { MarketDataLoader } from './MarketDetails' interface DayHighLowProps { high: number low: number isTableView?: boolean } const DayHighLow = ({ high, low, isTableView }: DayHighLowProps) => { const price = useOraclePrice() let rangePercent = 0 let latestPrice = 0 if (price) { latestPrice = price?.toNumber() } if (high) { rangePercent = ((latestPrice - low) * 100) / (high - low) } return (
{low ? formatUsdValue(low) : }
{high ? formatUsdValue(high) : }
) } export default DayHighLow