fix: 노을 결론이 공기(가시거리·습도)로 깎인 점수와 어긋나던 것 — 공기 보정 0.7배 미만이면 결론 한 단계 낮추고 이유 표시, 피드 노을 카드 점수 크게, 예보 기준 시각 표시
This commit is contained in:
1 parent
f4fe3e965c
commit
0a98fb8879
10 files changed
+67
-17
No files matched your search
@@ -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