feat(stock): /stock/screener 페이지 골격 + hooks 4개 + 컴포넌트 stub 6개
This commit is contained in:
25
src/pages/stock/screener/components/ResultTable.jsx
Normal file
25
src/pages/stock/screener/components/ResultTable.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
export default function ResultTable({ result }) {
|
||||
if (!result) return <section className="screener-card"><p style={{color:'#9ca3af'}}>아직 결과 없음. "지금 실행"을 눌러보세요.</p></section>;
|
||||
return (
|
||||
<section className="screener-card">
|
||||
<h3>Top {result.top_n} · 통과 {result.survivors_count}</h3>
|
||||
<table style={{ width: '100%', fontSize: 13 }}>
|
||||
<thead>
|
||||
<tr><th>#</th><th>종목</th><th>총점</th><th>진입</th><th>손절</th><th>익절</th><th>R%</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{(result.results || []).map((r) => (
|
||||
<tr key={r.ticker}>
|
||||
<td>{r.rank}</td><td>{r.name} ({r.ticker})</td>
|
||||
<td>{r.total_score?.toFixed?.(1)}</td>
|
||||
<td>{r.entry_price?.toLocaleString?.()}</td>
|
||||
<td>{r.stop_price?.toLocaleString?.()}</td>
|
||||
<td>{r.target_price?.toLocaleString?.()}</td>
|
||||
<td>{r.r_pct?.toFixed?.(1)}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user