Skip to content

Commit ed6214a

Browse files
committed
only block calendar loading if tasks are actually being queried
1 parent a364099 commit ed6214a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/frontend/src/pages/CalendarPage/CalendarPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ const NewCalendarPage: React.FC<NewCalendarPageProps> = ({
349349
conflictingReviewEventsLoading ||
350350
!conflictingReviewEvents ||
351351
tasksIsLoading ||
352-
!filteredTasks
352+
(showTasks && !filteredTasks)
353353
)
354354
return <LoadingIndicator />;
355355

@@ -904,18 +904,18 @@ const NewCalendarPage: React.FC<NewCalendarPageProps> = ({
904904
>
905905
Filters
906906
</Button>
907-
<FormControlLabel
908-
control={<Switch size="small" checked={showEvents} onChange={(e) => setShowEvents(e.target.checked)} />}
909-
label={<Typography sx={{ fontSize: 12, color: 'white', whiteSpace: 'nowrap' }}>Events</Typography>}
910-
sx={{ mr: 0 }}
911-
/>
912907
<FormControlLabel
913908
control={
914909
<Switch size="small" checked={allEventsMode} onChange={(e) => setAllEventsMode(e.target.checked)} />
915910
}
916911
label={<Typography sx={{ fontSize: 12, color: 'white', whiteSpace: 'nowrap' }}>Show All</Typography>}
917912
sx={{ mr: 0 }}
918913
/>
914+
<FormControlLabel
915+
control={<Switch size="small" checked={showEvents} onChange={(e) => setShowEvents(e.target.checked)} />}
916+
label={<Typography sx={{ fontSize: 12, color: 'white', whiteSpace: 'nowrap' }}>Events</Typography>}
917+
sx={{ mr: 0 }}
918+
/>
919919
<FormControlLabel
920920
control={<Switch size="small" checked={showTasks} onChange={(e) => setShowTasks(e.target.checked)} />}
921921
label={<Typography sx={{ fontSize: 12, color: 'white', whiteSpace: 'nowrap' }}>Tasks</Typography>}

0 commit comments

Comments
 (0)