import { VegaIcon, VegaIconNames } from '@vegaprotocol/ui-toolkit'; import { MarketSelector } from '../market-selector'; import { Last24hPriceChange, useMarket, useMarketList, } from '@vegaprotocol/markets'; import { useParams } from 'react-router-dom'; import * as PopoverPrimitive from '@radix-ui/react-popover'; import { useState } from 'react'; import { useT } from '../../lib/use-t'; import classNames from 'classnames'; import { MarketHeaderStats } from '../../client-pages/market/market-header-stats'; import { MarketMarkPrice } from '../market-mark-price'; /** * This is only rendered for the mobile navigation */ export const MobileMarketHeader = () => { const t = useT(); const { marketId } = useParams(); const { data } = useMarket(marketId); const [openMarket, setOpenMarket] = useState(false); const [openPrice, setOpenPrice] = useState(false); // Ensure that markets are kept cached so opening the list // shows all markets instantly useMarketList(); if (!marketId) return null; return (