- lottoUtils.jsx: 공통 유틸·상수 추출 (Ball, NumberRow, 통계 헬퍼 등) - hooks/useLottoData.js: 핵심 데이터 로드 (최신회차, 통계, 시뮬레이션, 리포트) - hooks/usePurchases.js: 구매 기록 CRUD - hooks/useManualRecommend.js: 수동 추천 + 히스토리 - components/: MetricBlock, FrequencyChart, PerformanceBanner, ConfidenceRing, CombinedRecommendPanel, ReportPanel, PersonalAnalysisPanel, PurchasePanel 분리 - getReport import 누락 버그 수정 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
965 B
JavaScript
26 lines
965 B
JavaScript
import React from 'react';
|
|
|
|
const ConfidenceRing = ({ score }) => {
|
|
const r = 28, c = 2 * Math.PI * r;
|
|
const fill = (score / 100) * c;
|
|
const color = score >= 80 ? '#97c9aa' : score >= 60 ? '#fdd4b1' : '#f7a8a5';
|
|
return (
|
|
<svg width="72" height="72" viewBox="0 0 72 72" className="lotto-confidence-ring" aria-hidden>
|
|
<circle cx="36" cy="36" r={r} stroke="rgba(255,255,255,0.08)" strokeWidth="6" fill="none" />
|
|
<circle
|
|
cx="36" cy="36" r={r}
|
|
stroke={color} strokeWidth="6" fill="none"
|
|
strokeDasharray={`${fill} ${c - fill}`}
|
|
strokeLinecap="round"
|
|
transform="rotate(-90 36 36)"
|
|
/>
|
|
<text x="36" y="41" textAnchor="middle" fill={color} fontSize="16" fontWeight="600"
|
|
style={{ fontFamily: 'inherit' }}>
|
|
{score}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default ConfidenceRing;
|