mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: calendar issues display filters loop fix (#2167)
This commit is contained in:
parent
a34b0b059d
commit
4ce01ca4f8
@ -60,7 +60,7 @@ export const CalendarView: React.FC<Props> = ({
|
||||
const router = useRouter();
|
||||
const { workspaceSlug, projectId, cycleId, moduleId, viewId } = router.query;
|
||||
|
||||
const { calendarIssues, params, setDisplayFilters } = useCalendarIssuesView();
|
||||
const { calendarIssues, params, displayFilters, setDisplayFilters } = useCalendarIssuesView();
|
||||
|
||||
const totalDate = eachDayOfInterval({
|
||||
start: calendarDates.startDate,
|
||||
@ -160,12 +160,13 @@ export const CalendarView: React.FC<Props> = ({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setDisplayFilters({
|
||||
calendar_date_range: `${renderDateFormat(startOfWeek(currentDate))};after,${renderDateFormat(
|
||||
lastDayOfWeek(currentDate)
|
||||
)};before`,
|
||||
});
|
||||
}, [currentDate, setDisplayFilters]);
|
||||
if (!displayFilters || displayFilters.calendar_date_range === "")
|
||||
setDisplayFilters({
|
||||
calendar_date_range: `${renderDateFormat(
|
||||
startOfWeek(currentDate)
|
||||
)};after,${renderDateFormat(lastDayOfWeek(currentDate))};before`,
|
||||
});
|
||||
}, [currentDate, displayFilters, setDisplayFilters]);
|
||||
|
||||
const isNotAllowed = userAuth.isGuest || userAuth.isViewer || disableUserActions;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user