주가 표시형식 수정
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import type { TrendSearchResultDto } from '../../utils/trendSearchApi';
|
||||
import { formatUpbitKrwPrice } from '../../utils/safeFormat';
|
||||
|
||||
interface Props {
|
||||
results: TrendSearchResultDto[];
|
||||
@@ -10,9 +11,7 @@ interface Props {
|
||||
}
|
||||
|
||||
function fmtPrice(n: number): string {
|
||||
if (n >= 1_000_000) return n.toLocaleString('ko-KR', { maximumFractionDigits: 0 });
|
||||
if (n >= 100) return n.toLocaleString('ko-KR', { maximumFractionDigits: 0 });
|
||||
return n.toLocaleString('ko-KR', { maximumFractionDigits: 4 });
|
||||
return formatUpbitKrwPrice(n, '-');
|
||||
}
|
||||
|
||||
function fmtPct(n: number): string {
|
||||
|
||||
Reference in New Issue
Block a user