@@ -19,7 +19,7 @@ type WorkspaceListItem = {
19
19
type UseWorkspaceListParams = {
20
20
policies : OnyxCollection < Policy > ;
21
21
currentUserLogin : string | undefined ;
22
- isOffline : boolean ;
22
+ shouldShowPendingDeletePolicy : boolean ;
23
23
selectedPolicyID : string | undefined ;
24
24
searchTerm : string ;
25
25
additionalFilter ?: ( policy : OnyxEntry < Policy > ) => boolean ;
@@ -41,7 +41,7 @@ function useWorkspaceList({
41
41
currentUserLogin,
42
42
selectedPolicyID,
43
43
searchTerm,
44
- isOffline ,
44
+ shouldShowPendingDeletePolicy ,
45
45
isWorkspaceSwitcher = false ,
46
46
hasUnreadData,
47
47
getIndicatorTypeForPolicy,
@@ -53,7 +53,7 @@ function useWorkspaceList({
53
53
}
54
54
55
55
return Object . values ( policies )
56
- . filter ( ( policy ) => ! ! policy && shouldShowPolicy ( policy , ! ! isOffline , currentUserLogin ) && ! policy ?. isJoinRequestPending && ( additionalFilter ? additionalFilter ( policy ) : true ) )
56
+ . filter ( ( policy ) => ! ! policy && shouldShowPolicy ( policy , shouldShowPendingDeletePolicy , currentUserLogin ) && ! policy ?. isJoinRequestPending && ( additionalFilter ? additionalFilter ( policy ) : true ) )
57
57
. map ( ( policy ) => ( {
58
58
text : policy ?. name ?? '' ,
59
59
policyID : policy ?. id ,
@@ -76,7 +76,7 @@ function useWorkspaceList({
76
76
brickRoadIndicator : getIndicatorTypeForPolicy ( policy ?. id ) ,
77
77
} ) ,
78
78
} ) ) ;
79
- } , [ policies , isOffline , currentUserLogin , additionalFilter , selectedPolicyID , getIndicatorTypeForPolicy , hasUnreadData , isWorkspaceSwitcher ] ) ;
79
+ } , [ policies , shouldShowPendingDeletePolicy , currentUserLogin , additionalFilter , selectedPolicyID , getIndicatorTypeForPolicy , hasUnreadData , isWorkspaceSwitcher ] ) ;
80
80
81
81
const filteredAndSortedUserWorkspaces = useMemo < WorkspaceListItem [ ] > (
82
82
( ) =>
0 commit comments