From d4f937b43951968832ea53b76c253c05c6bbec2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=B1=EA=B2=BD?= Date: Fri, 20 Nov 2026 14:05:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=9E=88=EC=96=B4=EB=A1=9C=20'=EC=A7=80?= =?UTF-8?q?=EA=B8=88'=20=EB=82=A0=EC=94=A8=EB=A5=BC=20=EC=A7=80=EA=B8=88?= =?UTF-8?q?=EC=9D=B4=20=EB=93=A0=203=EC=8B=9C=EA=B0=84=20=EC=B9=B8?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=E2=80=94=20=EC=B9=B8=20=EB=92=A4=EC=AA=BD?= =?UTF-8?q?=20=EC=A0=88=EB=B0=98=20=EC=8B=9C=EA=B0=81=EC=97=90=20=EB=8B=A4?= =?UTF-8?q?=EC=9D=8C=20=EC=B9=B8(=EC=B5=9C=EB=8C=80=201=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=20=EB=B0=98=20=EB=92=A4)=20=EC=98=88=EB=B3=B4=EA=B0=80=20?= =?UTF-8?q?=EC=A7=80=EA=B8=88=EC=9C=BC=EB=A1=9C=20=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EB=8D=98=20=EA=B2=83=20(=EC=84=9C=EB=B2=84=EA=B0=80=20?= =?UTF-8?q?=EC=A7=80=EA=B8=88=20=EC=B9=B8=EC=97=90=20=EC=A7=80=EA=B8=88=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=81=20=EC=98=88=EB=B3=B4=EB=A5=BC=20=EB=84=A3?= =?UTF-8?q?=EA=B8=B0=20=EC=A0=84=EC=9D=B8=2010/12=20=EC=9D=98=20'=EA=B0=80?= =?UTF-8?q?=EC=9E=A5=20=EA=B0=80=EA=B9=8C=EC=9A=B4=20=EC=B9=B8'=20?= =?UTF-8?q?=EA=B7=9C=EC=B9=99=EC=9D=B4=20=EB=82=A8=EC=95=84=20=EC=9E=88?= =?UTF-8?q?=EC=97=88=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/TodayPage.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/src/b/TodayPage.tsx b/frontend/src/b/TodayPage.tsx index c287258..c51c4b3 100644 --- a/frontend/src/b/TodayPage.tsx +++ b/frontend/src/b/TodayPage.tsx @@ -219,15 +219,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) }