File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,6 @@ function ItemSelectInput<Name extends string>(props: ItemSelectInputProps<Name>)
274274 } ,
275275 } ) ;
276276 } , [
277- variables ,
278277 fetchMoreUser ,
279278 fetchMoreUserGroup ,
280279 userData ?. users . offset ,
Original file line number Diff line number Diff line change @@ -298,22 +298,24 @@ function UserGroupDashboard(props: Props) {
298298 setDateRange ( newValue ?? defaultDateRange ) ;
299299 } , [ setDateRange ] ) ;
300300
301- const totalSwipes = userGroupStats ?. userGroupStats . stats . totalSwipes ;
302- const totalSwipesLastMonth = userGroupStats ?. userGroupStats . statsLatest . totalSwipes ;
301+ const totalSwipes = userGroupStats ?. userGroupStats ? .stats ? .totalSwipes ?? 0 ;
302+ const totalSwipesLastMonth = userGroupStats ?. userGroupStats ? .statsLatest ? .totalSwipes ?? 0 ;
303303
304- const totalSwipeTime = userGroupStats ?. userGroupStats . stats . totalSwipeTime ;
305- const totalSwipeTimeLastMonth = userGroupStats ?. userGroupStats . statsLatest . totalSwipeTime ;
304+ const totalSwipeTime = userGroupStats ?. userGroupStats ?. stats ?. totalSwipeTime ?? 0 ;
305+ // eslint-disable-next-line max-len
306+ const totalSwipeTimeLastMonth = userGroupStats ?. userGroupStats ?. statsLatest ?. totalSwipeTime ?? 0 ;
306307
307- const totalContributors = userGroupStats ?. userGroupStats . stats . totalContributors ;
308- const totalContributorsLastMonth = userGroupStats ?. userGroupStats . statsLatest . totalContributors ;
308+ const totalContributors = userGroupStats ?. userGroupStats ?. stats ?. totalContributors ?? 0 ;
309+ // eslint-disable-next-line max-len
310+ const totalContributorsLastMonth = userGroupStats ?. userGroupStats ?. statsLatest ?. totalContributors ?? 0 ;
309311
310312 const filteredStats = filteredUserGroupStats ?. userGroupStats ?. filteredStats ;
311313
312314 return (
313315 < Page
314316 className = { className }
315317 variant = "userGroup"
316- heading = { userGroupStats ?. userGroup . name }
318+ heading = { userGroupStats ?. userGroup ? .name }
317319 totalSwipes = { totalSwipes }
318320 totalSwipesLastMonth = { totalSwipesLastMonth }
319321 totalTimeSpent = { totalSwipeTime }
You can’t perform that action at this time.
0 commit comments