mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 11:15:21 +03:00
Refactor Calendar component to update month details only when year or month changes
This commit is contained in:
parent
98576418a8
commit
0a1024983d
@ -101,10 +101,9 @@ const Calendar = ({ onChange, calendarRef, close, dateRange, children }) => {
|
||||
setState((prev) => ({
|
||||
...prev,
|
||||
selectedDay: todayTimestamp,
|
||||
monthDetails: getMonthDetails(year, month),
|
||||
timeRange: { ...dateRange },
|
||||
monthDetails: getMonthDetails(year, month)
|
||||
}));
|
||||
}, [year, month, getMonthDetails, dateRange]);
|
||||
}, [year, month, getMonthDetails]);
|
||||
|
||||
useEffect(() => {
|
||||
// add refs for keyboard navigation
|
||||
|
||||
Loading…
Reference in New Issue
Block a user