가상투자 종목카드박스 레이아웃 수정
This commit is contained in:
@@ -234,3 +234,19 @@ export function formatUpdatedTime(ts: number | undefined): string {
|
||||
hour12: false,
|
||||
});
|
||||
}
|
||||
|
||||
/** 카드 푸터용 전략 조건 한 줄 요약 */
|
||||
export function formatVirtualConditionBrief(
|
||||
row: VirtualConditionRow & { currentValue?: number | null },
|
||||
): string {
|
||||
const sideTag = row.side === 'buy' ? '[매수]' : row.side === 'sell' ? '[매도]' : '';
|
||||
const threshold = row.thresholdLabel
|
||||
?? formatStrategyThreshold(row.conditionType, row.targetValue, row.conditionLabel);
|
||||
return [sideTag, row.displayName, threshold].filter(Boolean).join(' ');
|
||||
}
|
||||
|
||||
export function formatVirtualCardConditionLines(
|
||||
rows: Array<VirtualConditionRow & { currentValue?: number | null }>,
|
||||
): string[] {
|
||||
return rows.map(formatVirtualConditionBrief);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user