fix: don't show trigger if unspecified
This commit is contained in:
parent
3c02d9f086
commit
edfb0a4e37
@ -23,6 +23,7 @@ import {
|
|||||||
PriceCellChange,
|
PriceCellChange,
|
||||||
} from '@vegaprotocol/ui-toolkit';
|
} from '@vegaprotocol/ui-toolkit';
|
||||||
import type { CandleClose } from '@vegaprotocol/types';
|
import type { CandleClose } from '@vegaprotocol/types';
|
||||||
|
import { AuctionTrigger } from '@vegaprotocol/types';
|
||||||
import { MarketTradingMode } from '@vegaprotocol/types';
|
import { MarketTradingMode } from '@vegaprotocol/types';
|
||||||
import capitalize from 'lodash/capitalize';
|
import capitalize from 'lodash/capitalize';
|
||||||
import startCase from 'lodash/startCase';
|
import startCase from 'lodash/startCase';
|
||||||
@ -102,7 +103,9 @@ export const TradeMarketHeader = ({
|
|||||||
<div className={headerItemClassName}>
|
<div className={headerItemClassName}>
|
||||||
<span className={itemClassName}>Trading mode</span>
|
<span className={itemClassName}>Trading mode</span>
|
||||||
<span data-testid="trading-mode" className={itemValueClassName}>
|
<span data-testid="trading-mode" className={itemValueClassName}>
|
||||||
{market.tradingMode === MarketTradingMode.MonitoringAuction
|
{market.tradingMode === MarketTradingMode.MonitoringAuction &&
|
||||||
|
market.data?.trigger &&
|
||||||
|
market.data.trigger !== AuctionTrigger.Unspecified
|
||||||
? `${formatLabel(
|
? `${formatLabel(
|
||||||
market.tradingMode
|
market.tradingMode
|
||||||
)} - ${market.data?.trigger.toLowerCase()}`
|
)} - ${market.data?.trigger.toLowerCase()}`
|
||||||
|
Loading…
Reference in New Issue
Block a user