From 9bc31d23f5d122891a6ecfad2b699d837d2fbf33 Mon Sep 17 00:00:00 2001 From: gahusb Date: Wed, 27 May 2026 07:44:47 +0900 Subject: [PATCH] =?UTF-8?q?feat(saju-ui-v2):=20today.mobile.jsx=20?= =?UTF-8?q?=E2=80=94=20FortuneRing=20+=204=20ScoreCard=20+=20LuckyBox=20+?= =?UTF-8?q?=20signs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/saju/views/today.mobile.jsx | 145 ++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 src/pages/saju/views/today.mobile.jsx 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}
+ +
+ ); +}