From 5fd846bfc8267c42eac90bef8fa23a493389d4bc Mon Sep 17 00:00:00 2001 From: aits2026 Date: Fri, 6 Mar 2026 15:39:13 +0800 Subject: [PATCH] feat(sns): show daily counts in jump calendar --- src/components/JumpToDatePopover.tsx | 10 ++- src/components/Sns/SnsFilterPanel.tsx | 92 ++++++++++++++++++++++++++- 2 files changed, 98 insertions(+), 4 deletions(-) diff --git a/src/components/JumpToDatePopover.tsx b/src/components/JumpToDatePopover.tsx index 0a21929..ef3c807 100644 --- a/src/components/JumpToDatePopover.tsx +++ b/src/components/JumpToDatePopover.tsx @@ -6,6 +6,7 @@ interface JumpToDatePopoverProps { isOpen: boolean onClose: () => void onSelect: (date: Date) => void + onMonthChange?: (date: Date) => void className?: string style?: React.CSSProperties currentDate?: Date @@ -20,6 +21,7 @@ const JumpToDatePopover: React.FC = ({ isOpen, onClose, onSelect, + onMonthChange, className, style, currentDate = new Date(), @@ -112,13 +114,17 @@ const JumpToDatePopover: React.FC = ({ const weekdays = ['日', '一', '二', '三', '四', '五', '六'] const days = generateCalendar() const mergedClassName = ['jump-date-popover', className || ''].join(' ').trim() + const updateCalendarDate = (nextDate: Date) => { + setCalendarDate(nextDate) + onMonthChange?.(nextDate) + } return (