fix: 노을 탭 히어로를 다시 해 지는 시각 크게, 점수는 결론 카드 아래 줄로
This commit is contained in:
1 parent
0a98fb8879
commit
8422829f9d
2 files changed
+10
-11
No files matched your search
@@ -33,19 +33,13 @@ const HERO = 'relative mx-3 mt-1 min-h-[230px] overflow-hidden rounded-[32px] px
|
||||
const THREE = [0, 1, 2]
|
||||
const RANK_SKELS = Array.from({ length: 8 }, (_, i) => i)
|
||||
|
||||
/** 히어로엔 점수를 크게, 아래에 해 지는(뜨는) 시각과 하늘 상황 한 줄. 결론·이유는 아래 카드로 */
|
||||
/** 히어로엔 해 지는(뜨는) 시각과 하늘 상황 한 줄만. 결론·이유·점수는 아래 카드로 */
|
||||
function HeroBody({ plan, sunAt }: { plan?: SkyPlanData; sunAt?: string }) {
|
||||
const v = (node: ReactNode, w: string) => (plan ? node : <Skel className={w} />)
|
||||
const rise = plan?.kind === 'sunrise'
|
||||
return (
|
||||
<div className="relative z-[1] [text-shadow:0_2px_10px_rgb(50_25_70/0.35)]" aria-hidden={plan ? undefined : true}>
|
||||
<p className="m-0 mt-2.5 flex items-baseline gap-1.5">
|
||||
<b className="font-bagel text-[64px] leading-none font-normal">{v(plan?.score, 'w-[110px]')}</b>
|
||||
{plan && <span className="font-jua text-[20px]">점 · {plan.grade_label}</span>}
|
||||
</p>
|
||||
<p className="m-0 mt-1.5 font-jua text-[19px]">
|
||||
{v(plan && [sunAt && `${clockShort(sunAt)} ${rise ? '해 떠요' : '해 져요'}`, plan.situation_label ?? plan.headline].filter(Boolean).join(' · '), 'w-[220px]')}
|
||||
</p>
|
||||
<p className="m-0 mt-2.5 font-bagel text-[52px] leading-none">{v(sunAt && clockShort(sunAt), 'w-[150px]')}</p>
|
||||
<p className="m-0 mt-1.5 font-jua text-[21px]">{v(plan?.situation_label ?? plan?.headline, 'w-[190px]')}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -55,7 +49,11 @@ function Verdict({ plan, sunAt }: { plan?: SkyPlanData; sunAt?: string }) {
|
||||
const v = (node: ReactNode, w: string) => (plan ? node : <Skel className={w} />)
|
||||
// 지금 하늘이 아니라 해 질(뜰) 무렵 예보라는 걸 밝힌다
|
||||
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(' · ')
|
||||
const agree = [
|
||||
basis,
|
||||
plan ? `${plan.kind === 'sunrise' ? '일출' : '노을'} 점수 ${plan.score}` : '',
|
||||
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">
|
||||
|
||||
Reference in new issue
Block a user