diff --git a/src/pages/saju/views/today.mobile.jsx b/src/pages/saju/views/today.mobile.jsx new file mode 100644 index 0000000..f827e7e --- /dev/null +++ b/src/pages/saju/views/today.mobile.jsx @@ -0,0 +1,145 @@ +import React from 'react'; +import { useNavigate } from 'react-router-dom'; +import TopRibbon from '../_shell/TopRibbon'; +import TitleBlock from '../_shell/TitleBlock'; +import Mascot from '../_shell/Mascot'; +import MascotBubble from '../_shell/MascotBubble'; +import OrnateFrame from '../_shell/OrnateFrame'; +import OrnamentBloom from '../_shell/OrnamentBloom'; +import PrimaryButton from '../_shell/PrimaryButton'; +import { IconChevron } from '../_shell/Icons'; + +const SCORE_LABELS = { + wealth: { ko: '재물운', icon: '財' }, + romance: { ko: '연애운', icon: '愛' }, + social: { ko: '인간관계', icon: '人' }, + career: { ko: '직장운', icon: '職' }, +}; + +export default function TodayMobile({ reading }) { + const navigate = useNavigate(); + const scores = reading?.fortune_scores || {}; + const lucky = reading?.lucky || {}; + const signs = lucky.good_signs || []; + const warnings = lucky.warnings || []; + const overall = Math.round(scores.overall || 0); + const todayStr = new Date().toLocaleDateString('ko-KR', { year: 'numeric', month: 'long', day: 'numeric' }); + + return ( +
+ +
+ +
+
+ + +
+ +
+ +
+ +
+ {Object.entries(SCORE_LABELS).map(([key, { ko, icon }]) => ( + + ))} +
+ +
+ +
+ + 오늘의 럭키 +
+
+ + + +
+
+
+ + {(signs.length > 0 || warnings.length > 0) && ( +
+ {signs.length > 0 && } + {warnings.length > 0 && } +
+ )} + +
+ navigate(`/saju/result?rid=${reading?.id || ''}`)}> + 내 사주 자세히 보기 + +
+
+ ); +} + +function FortuneRing({ value }) { + const R = 60; + const C = 2 * Math.PI * R; + const offset = C - (C * value) / 100; + return ( + + + + + {value} + + + ); +} + +function ScoreCard({ ko, icon, value }) { + return ( +
+
{icon}
+
+
{ko}
+
+ {value} +
+
+
+ ); +} + +function LuckyItem({ label, value }) { + return ( +
+
{label}
+
{value || '-'}
+
+ ); +} + +function SignList({ title, items, color }) { + return ( +
+
{title}
+ +
+ ); +}