Compare commits
2 Commits
a54d6addf2
...
dc9d2dca88
| Author | SHA1 | Date | |
|---|---|---|---|
| dc9d2dca88 | |||
| 309a778a63 |
@@ -16,7 +16,7 @@
|
|||||||
import React, { useMemo } from 'react'
|
import React, { useMemo } from 'react'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import api from '../lib/api'
|
import api from '../lib/api'
|
||||||
import { Activity, TrendingUp, Clock, UserCircle, Globe } from 'lucide-react'
|
import { Activity, TrendingUp, UserCircle, Globe } from 'lucide-react'
|
||||||
import { Position } from '../types/trading'
|
import { Position } from '../types/trading'
|
||||||
import { isUsStock } from '../utils/stockUtils'
|
import { isUsStock } from '../utils/stockUtils'
|
||||||
import { groupHoldings, GroupedHolding } from '../utils/portfolioGrouping'
|
import { groupHoldings, GroupedHolding } from '../utils/portfolioGrouping'
|
||||||
@@ -253,7 +253,7 @@ const PortfolioPanel = React.memo(({
|
|||||||
}, [dtPositions, dtError])
|
}, [dtPositions, dtError])
|
||||||
|
|
||||||
const groups = useMemo(() => groupHoldings(portfolio, dtRows), [portfolio, dtRows])
|
const groups = useMemo(() => groupHoldings(portfolio, dtRows), [portfolio, dtRows])
|
||||||
const total = groups.daytrading.length + groups.swing.length + groups.manual.length + groups.overseas.length
|
const total = groups.swing.length + groups.manual.length + groups.overseas.length
|
||||||
|
|
||||||
/** 그룹 소계 (실시간 가격 우선). 통화가 다르므로 그룹 내 같은 통화끼리만 합산 */
|
/** 그룹 소계 (실시간 가격 우선). 통화가 다르므로 그룹 내 같은 통화끼리만 합산 */
|
||||||
const subtotal = (stocks: Position[]) => {
|
const subtotal = (stocks: Position[]) => {
|
||||||
@@ -324,9 +324,6 @@ const PortfolioPanel = React.memo(({
|
|||||||
보유 종목
|
보유 종목
|
||||||
</h3>
|
</h3>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
{groups.daytrading.length > 0 && (
|
|
||||||
<span className="text-[8px] font-mono text-[#f97316] bg-[#f97316]/10 px-1.5 py-px rounded-sm">데이 {groups.daytrading.length}</span>
|
|
||||||
)}
|
|
||||||
{groups.swing.length > 0 && (
|
{groups.swing.length > 0 && (
|
||||||
<span className="text-[8px] font-mono text-[#a78bfa] bg-[#a78bfa]/10 px-1.5 py-px rounded-sm">스윙 {groups.swing.length}</span>
|
<span className="text-[8px] font-mono text-[#a78bfa] bg-[#a78bfa]/10 px-1.5 py-px rounded-sm">스윙 {groups.swing.length}</span>
|
||||||
)}
|
)}
|
||||||
@@ -348,7 +345,7 @@ const PortfolioPanel = React.memo(({
|
|||||||
</div>
|
</div>
|
||||||
) : total > 0 ? (
|
) : total > 0 ? (
|
||||||
<>
|
<>
|
||||||
{renderGroup(groups.daytrading, '데이트레이딩', <Clock className="w-2.5 h-2.5 text-[#f97316]" />, 'text-[#f97316]', '15:20 자동 청산 (당일 청산 원칙)')}
|
{/* 데이트레이딩 포지션은 보유종목 목록에서 제외(사용자 요청 2026-10-06) — 하단 DayTradingStatusBar 에서 확인 */}
|
||||||
{renderGroup(groups.swing, '스윙', <TrendingUp className="w-2.5 h-2.5 text-[#a78bfa]" />, 'text-[#a78bfa]')}
|
{renderGroup(groups.swing, '스윙', <TrendingUp className="w-2.5 h-2.5 text-[#a78bfa]" />, 'text-[#a78bfa]')}
|
||||||
{renderGroup(groups.manual, '수동 / 외부', <UserCircle className="w-2.5 h-2.5 text-[#eab308]" />, 'text-[#eab308]', '자동 청산 대상 아님 - 직접 청산 필요')}
|
{renderGroup(groups.manual, '수동 / 외부', <UserCircle className="w-2.5 h-2.5 text-[#eab308]" />, 'text-[#eab308]', '자동 청산 대상 아님 - 직접 청산 필요')}
|
||||||
{renderGroup(groups.overseas, '해외', <Globe className="w-2.5 h-2.5 text-[#22c55e]" />, 'text-[#22c55e]', undefined, true)}
|
{renderGroup(groups.overseas, '해외', <Globe className="w-2.5 h-2.5 text-[#22c55e]" />, 'text-[#22c55e]', undefined, true)}
|
||||||
|
|||||||
Reference in New Issue
Block a user