File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
packages/web/src/views/Calendar/hooks Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ import dayjs from "dayjs" ;
12import { useEffect } from "react" ;
23import { toUTCOffset } from "@web/common/utils/web.date.util" ;
34import { Sync_AsyncStateContextReason } from "@web/ducks/events/context/sync.context" ;
45import { Week_AsyncStateContextReason } from "@web/ducks/events/context/week.context" ;
56import { selectImportLatestState } from "@web/ducks/events/selectors/sync.selector" ;
67import { selectDatesInView } from "@web/ducks/events/selectors/view.selectors" ;
8+ import { getSomedayEventsSlice } from "@web/ducks/events/slices/someday.slice" ;
79import { resetIsFetchNeeded } from "@web/ducks/events/slices/sync.slice" ;
810import { getWeekEventsSlice } from "@web/ducks/events/slices/week.slice" ;
911import { useAppDispatch , useAppSelector } from "@web/store/store.hooks" ;
@@ -33,6 +35,19 @@ export const useRefresh = () => {
3335 } ,
3436 } ) ,
3537 ) ;
38+
39+ const startDate = dayjs ( start ) . startOf ( "month" ) . format ( ) ;
40+ const endDate = dayjs ( end ) . endOf ( "month" ) . format ( ) ;
41+ dispatch (
42+ getSomedayEventsSlice . actions . request ( {
43+ startDate,
44+ endDate,
45+ __context : {
46+ reason : getRefreshWeekEventsReason ( ) ,
47+ } ,
48+ } ) ,
49+ ) ;
50+ console . log ( "getWeekEventsSlice.actions.request" ) ;
3651 dispatch ( resetIsFetchNeeded ( ) ) ;
3752 }
3853 // eslint-disable-next-line react-hooks/exhaustive-deps
You can’t perform that action at this time.
0 commit comments