feat: 각 탭·스토리·각 상세에 지금 구간 점수와 아침·낮·저녁·밤 칸, 히어로 '지금 날씨 점수'
This commit is contained in:
1 parent
d6525f592c
commit
5a5f585bda
10 files changed
+152
-26
No files matched your search
@@ -157,6 +157,8 @@ function Swap({ labels, at }: { labels: readonly ReactNode[]; at: number }) {
|
||||
/* ---------- 시트 스켈레톤: 완료 화면과 같은 틀·같은 줄 높이 ---------- */
|
||||
const N3 = [0, 1, 2]
|
||||
const N4 = [0, 1, 2, 3]
|
||||
const SLOT_KEYS = ['morning', 'day', 'evening', 'night'] as const
|
||||
const SLOT_NAMES = { morning: '아침', day: '낮', evening: '저녁', night: '밤' } as const
|
||||
const N6 = [0, 1, 2, 3, 4, 5]
|
||||
const N14 = Array.from({ length: 14 }, (_, i) => i)
|
||||
|
||||
@@ -348,8 +350,9 @@ function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string)
|
||||
<h4 className="m-0 font-jua text-[22px] font-normal">{g.name}</h4>
|
||||
{d.description && <p className="mt-0.5 text-[13.5px] font-semibold text-(--ink2)">{d.description}</p>}
|
||||
</div>
|
||||
<b className="ml-auto font-bagel text-[42px] font-normal text-(--orange)">{g.score}</b>
|
||||
<b className={cx('ml-auto font-bagel text-[42px] font-normal', g.active ? 'text-(--orange)' : 'text-(--ink3)')}>{g.score}</b>
|
||||
</div>
|
||||
{!g.active && <p className="mt-2 text-[13px] font-bold text-(--ink2)">지금 시간대엔 해당 없어요. 점수는 오늘 가장 좋은 시간대 기준이에요.</p>}
|
||||
{now && (
|
||||
<p className="mt-3 rounded-2xl bg-[#fff4ec] px-3.5 py-2.5 text-[14.5px] font-bold">
|
||||
<b className="mr-1.5 font-jua font-normal text-(--orange)">{now.low}~{now.high}점</b>
|
||||
@@ -357,6 +360,23 @@ function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string)
|
||||
</p>
|
||||
)}
|
||||
{factors.length > 2 && <Radar name={g.name} factors={factors} />}
|
||||
{g.slots && g.slots.length > 0 && (
|
||||
<div className="mt-2.5 grid grid-cols-4 gap-1.5" aria-label="오늘 시간대별 점수">
|
||||
{SLOT_KEYS.map((k) => {
|
||||
const s = g.slots?.find((x) => x.slot === k)
|
||||
const cur = g.active && g.slot === k
|
||||
return (
|
||||
<div key={k} className={cx('rounded-2xl px-1 py-2 text-center', cur ? 'bg-[#fff4ec]' : 'bg-[#f3f6fb]')}>
|
||||
<small className="block text-xs font-extrabold text-(--ink2)">
|
||||
{SLOT_NAMES[k]}
|
||||
{cur && ' · 지금'}
|
||||
</small>
|
||||
<b className={cx('block font-bagel text-xl font-normal', s ? 'text-(--orange)' : 'text-(--ink3)')}>{s ? s.score : '–'}</b>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
{g.trend && g.trend.length > 0 && (
|
||||
<div className="mt-2.5 grid grid-cols-4 gap-1.5">
|
||||
{g.trend.map((t) => (
|
||||
|
||||
Reference in new issue
Block a user