chore: fix/hero-now-slot 병합 — 안 쓰는 네이티브 화면·패키지 정리(mobile 81개 파일, 15개 패키지), 히어로 '지금' 날씨를 지금이 든 3시간 칸으로, 앱 버전 1.1.2(1005). region.tsx 는 main 의 최신(탭 이동 시 위치 되돌아감 수정 + 지역 창 기록 처리)을 그대로 둠

This commit is contained in:
skkim committed 2026-11-24 11:17:34 +09:00
commit cd77589d86
89 files changed
+70 -9214

No files matched your search

+2 -8
View File
@@ -220,15 +220,9 @@ function Hero({ hero, post, today, ranked, all, feedLoad, todayLoad }: HeroProps
}, [tmr, tmrKind, setPreview])
const slots = (tmr ? tomorrowQ.data?.slots : today?.slots) ?? []
const slotsLoad = tmr ? loadOf(tomorrowQ) : todayLoad
// 그 시각 칸, 비어 있으면(지난 새벽 칸 등) 그 뒤 첫 예보 칸
// 지금은 가장 가까운 3시간 칸(17시면 18시 칸). 시간대는 그 시각 칸, 비어 있으면(지난 새벽 칸 등) 그 뒤 첫 예보 칸
// 지금은 지금이 든 3시간 칸(17시면 15시 칸. 서버가 그 칸에 지금 시각 예보를 넣어 준다). 시간대는 그 시각 칸, 비어 있으면(지난 새벽 칸 등) 그 뒤 첫 예보 칸
const slotOf = (k: TimeKind | 'now') => {
if (k === 'now') {
const known = slots.filter((x) => x.temp_c != null)
const at = t.h + t.mi / 60
return known.length ? known.reduce((a, b) => (Math.abs(kst(b.at).h - at) < Math.abs(kst(a.at).h - at) ? b : a)) : undefined
}
const h = PREVIEW[k].hour
const h = k === 'now' ? t.h : PREVIEW[k].hour
const s = slots.length ? slotAt(slots, h) : undefined
return s?.temp_c != null ? s : (slots.find((x) => kst(x.at).h > h && x.temp_c != null) ?? s)
}