import { TradingDropdownItem, TradingDropdownCopyItem, Link, VegaIcon, VegaIconNames, ActionsDropdown, } from '@vegaprotocol/ui-toolkit'; import { DApp, EXPLORER_MARKET, useLinks } from '@vegaprotocol/environment'; import { useAssetDetailsDialogStore } from '@vegaprotocol/assets'; import { useNavigate } from 'react-router-dom'; import { Links } from '../../lib/links'; import { useT } from '../../lib/use-t'; export const MarketActionsDropdown = ({ marketId, assetId, successorMarketID, parentMarketID, }: { marketId: string; assetId: string; successorMarketID: string | null | undefined; parentMarketID: string | null | undefined; }) => { const t = useT(); const navigate = useNavigate(); const open = useAssetDetailsDialogStore((store) => store.open); const linkCreator = useLinks(DApp.Explorer); return ( {t('View on Explorer')} { open(assetId, e.target as HTMLElement); }} > {t('View settlement asset details')} {parentMarketID && ( { navigate(Links.MARKET(parentMarketID)); }} > {t('View parent market')} )} {successorMarketID && ( { navigate(Links.MARKET(successorMarketID)); }} > {t('View successor market')} )} ); };