Fix today analysis modal routing

This commit is contained in:
2569718930@qq.com
2026-04-17 20:40:17 +08:00
parent f98388ce69
commit bc09a3753c
4 changed files with 43 additions and 6 deletions
@@ -1020,7 +1020,11 @@ export function ForecastTable() {
daily.map((day, index) => {
const isToday = day.date === data.local_date || index === 0;
const isSelected =
store.futureModalDate === day.date ||
(isToday &&
store.forecastModalMode === "today" &&
Boolean(store.futureModalDate)) ||
(store.forecastModalMode !== "today" &&
store.futureModalDate === day.date) ||
store.selectedForecastDate === day.date;
return (
<button
@@ -1033,6 +1037,10 @@ export function ForecastTable() {
)}
onClick={() => {
startTransition(() => {
if (isToday) {
store.openTodayModal();
return;
}
store.openFutureModal(day.date);
});
}}