주가 표시형식 수정
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { memo } from 'react';
|
||||
import { useUpbitOrderbook } from '../../hooks/useUpbitOrderbook';
|
||||
import { coerceFiniteNumber, safeToFixed } from '../../utils/safeFormat';
|
||||
import { coerceFiniteNumber, safeToFixed, formatUpbitKrwPrice } from '../../utils/safeFormat';
|
||||
|
||||
interface Props {
|
||||
market: string;
|
||||
@@ -14,8 +14,7 @@ interface Props {
|
||||
|
||||
function fmtPrice(p: unknown): string {
|
||||
const n = coerceFiniteNumber(p);
|
||||
if (n == null) return '-';
|
||||
return n >= 1000 ? n.toLocaleString('ko-KR', { maximumFractionDigits: 0 }) : safeToFixed(n, 4);
|
||||
return formatUpbitKrwPrice(n, '-');
|
||||
}
|
||||
|
||||
function fmtSize(s: unknown): string {
|
||||
|
||||
Reference in New Issue
Block a user