/** * 매매 시그널 알림 목록 화면 */ import React, { useCallback } from 'react'; import type { Theme } from '../types'; import { useTradeNotification, type TradeNotificationItem } from '../contexts/TradeNotificationContext'; import { buildSignalDetailRows, formatSignalPrice, getSignalHeadline } from '../utils/tradeSignalDisplay'; interface Props { theme: Theme; onGoToChart: (market: string) => void; } export const TradeNotificationListPage: React.FC = ({ theme, onGoToChart }) => { const { allNotifications, unreadCount, markAsRead, markAllAsRead, openDetail, refreshHistory, } = useTradeNotification(); const [filter, setFilter] = React.useState<'all' | 'unread'>('all'); const filtered = filter === 'unread' ? allNotifications.filter(n => !n.isRead) : allNotifications; const handleRow = useCallback((item: TradeNotificationItem) => { if (!item.isRead) markAsRead(item.id); openDetail(item, { centered: true }); }, [markAsRead, openDetail]); return (

매매 시그널 알림

실시간 전략 실행 시 발생한 BUY/SELL 신호입니다. 화면·종목과 무관하게 수신됩니다.

미확인 {unreadCount}건
{unreadCount > 0 && ( )}
{filtered.length === 0 ? (
표시할 알림이 없습니다.
) : (
    {filtered.map(item => { const isBuy = item.signalType === 'BUY'; const detailRows = buildSignalDetailRows(item); return (
  • ); })}
)}
); }; export default TradeNotificationListPage;