refactor(ui): normalize trade plan id chips
This commit is contained in:
parent
217b46e123
commit
f8b2107bff
@ -1515,26 +1515,30 @@ export function SimpleView() {
|
|||||||
</span>
|
</span>
|
||||||
) : null}
|
) : null}
|
||||||
{(runtimeSnapshot?.tradeId || entry.linked_trade_id) ? (
|
{(runtimeSnapshot?.tradeId || entry.linked_trade_id) ? (
|
||||||
<button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
variant="subtle"
|
||||||
|
size="sm"
|
||||||
onClick={() => void copyIdentifier('trade', String(runtimeSnapshot?.tradeId || entry.linked_trade_id))}
|
onClick={() => void copyIdentifier('trade', String(runtimeSnapshot?.tradeId || entry.linked_trade_id))}
|
||||||
className="saved-setup-id-chip"
|
className="saved-setup-id-chip"
|
||||||
>
|
>
|
||||||
{copiedKey === `trade:${String(runtimeSnapshot?.tradeId || entry.linked_trade_id)}`
|
{copiedKey === `trade:${String(runtimeSnapshot?.tradeId || entry.linked_trade_id)}`
|
||||||
? 'Trade copied'
|
? 'Trade copied'
|
||||||
: `Trade ${String(runtimeSnapshot?.tradeId || entry.linked_trade_id).slice(0, 18)}…`}
|
: `Trade ${String(runtimeSnapshot?.tradeId || entry.linked_trade_id).slice(0, 18)}…`}
|
||||||
</button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
{runtimeSnapshot?.orderId ? (
|
{runtimeSnapshot?.orderId ? (
|
||||||
<button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
variant="subtle"
|
||||||
|
size="sm"
|
||||||
onClick={() => void copyIdentifier('order', runtimeSnapshot.orderId)}
|
onClick={() => void copyIdentifier('order', runtimeSnapshot.orderId)}
|
||||||
className="saved-setup-id-chip"
|
className="saved-setup-id-chip"
|
||||||
>
|
>
|
||||||
{copiedKey === `order:${runtimeSnapshot.orderId}`
|
{copiedKey === `order:${runtimeSnapshot.orderId}`
|
||||||
? 'Order copied'
|
? 'Order copied'
|
||||||
: `Order ${runtimeSnapshot.orderId.slice(0, 12)}…`}
|
: `Order ${runtimeSnapshot.orderId.slice(0, 12)}…`}
|
||||||
</button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
{updatedAt ? (
|
{updatedAt ? (
|
||||||
<span className="saved-setup-updated">
|
<span className="saved-setup-updated">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user