fix: 노을 결론이 공기(가시거리·습도)로 깎인 점수와 어긋나던 것 — 공기 보정 0.7배 미만이면 결론 한 단계 낮추고 이유 표시, 피드 노을 카드 점수 크게, 예보 기준 시각 표시
This commit is contained in:
1 parent
f4fe3e965c
commit
0a98fb8879
10 files changed
+67
-17
No files matched your search
@@ -130,10 +130,13 @@ function SlideView({ slide, bg }: { slide: Slide; bg: SlideBg }) {
|
||||
return (
|
||||
<div className={cx(slideBase, slide.situation ? `b-sit-${slide.situation}` : 'b-bg-dusk')}>
|
||||
<Eyebrow>{slide.eyebrow}</Eyebrow>
|
||||
<Big>
|
||||
<p className="m-0 mt-1.5 flex items-baseline gap-1.5">
|
||||
<b className="font-bagel text-[52px] leading-none font-normal">{slide.score}</b>
|
||||
<span className="font-jua text-[19px]">점 · {slide.grade_label}</span>
|
||||
</p>
|
||||
<p className="m-0 mt-1 font-jua text-[18px] leading-snug">
|
||||
<Lines text={slide.line} />
|
||||
</Big>
|
||||
<small className="mt-1 text-[12.5px] font-bold opacity-85">노을 점수 {slide.score}</small>
|
||||
</p>
|
||||
<div className="mt-3 flex flex-1 flex-col gap-2">
|
||||
{slide.cuts.map((c, i) => (
|
||||
<div key={c.kind} className={cx('b-skyline relative flex-1 overflow-hidden rounded-2xl px-3 py-2 font-bagel text-[21px] text-white', `b-cut-${Math.min(i + 1, 3)}`)}>
|
||||
|
||||
@@ -51,9 +51,11 @@ function HeroBody({ plan, sunAt }: { plan?: SkyPlanData; sunAt?: string }) {
|
||||
}
|
||||
|
||||
/** 결론과 이유, 예보 모델이 얼마나 같은 예보를 냈는지, 점수(작게) */
|
||||
function Verdict({ plan }: { plan?: SkyPlanData }) {
|
||||
function Verdict({ plan, sunAt }: { plan?: SkyPlanData; sunAt?: string }) {
|
||||
const v = (node: ReactNode, w: string) => (plan ? node : <Skel className={w} />)
|
||||
const agree = plan?.models_total ? `예보 모델 ${plan.models_total}개 중 ${plan.models_agree}개가 같은 예보` : ''
|
||||
// 지금 하늘이 아니라 해 질(뜰) 무렵 예보라는 걸 밝힌다
|
||||
const basis = sunAt ? `해 ${plan?.kind === 'sunrise' ? '뜰' : '질'} 무렵(${new Date(sunAt).getHours()}시) 예보 기준` : ''
|
||||
const agree = [basis, plan?.models_total ? `예보 모델 ${plan.models_total}개 중 ${plan.models_agree}개가 같은 예보` : ''].filter(Boolean).join(' · ')
|
||||
return (
|
||||
<div className="mx-3 mt-3 rounded-[22px] bg-white px-4 py-3 text-[14px] font-semibold shadow-[inset_0_-5px_0_var(--shade)]" aria-hidden={plan ? undefined : true}>
|
||||
<p className="m-0">
|
||||
@@ -174,7 +176,7 @@ export function SkyPage() {
|
||||
<StateBox load={load} onRetry={() => sky.refetch()} empty="오늘 노을 정보가 없어요." hold={<HeroBody />} className="inset-x-0 top-1.5 bottom-0" />
|
||||
)}
|
||||
</div>
|
||||
{(plan || load === 'loading') && <Verdict plan={plan} />}
|
||||
{(plan || load === 'loading') && <Verdict plan={plan} sunAt={sunAt} />}
|
||||
<Sec title="언제 보면 좋을까" sub={rise ? '보통 해 뜨기 10~20분 전이 가장 붉어요' : '보통 해 진 뒤 10~20분이 가장 붉어요'} />
|
||||
{plan?.timeline?.length || load === 'loading' ? (
|
||||
<Timeline rows={plan?.timeline} kind={plan?.kind} />
|
||||
|
||||
Reference in new issue
Block a user