File tree Expand file tree Collapse file tree
src/pages/settings/Security/AddDelegate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,8 +47,11 @@ function AddDelegatePage() {
4747 Navigation . navigate ( ROUTES . SETTINGS_DELEGATE_ROLE . getRoute ( option . login ?? '' ) ) ;
4848 } ;
4949
50+ const recentReportLogins = new Set ( searchOptions . recentReports . map ( ( option ) => option . login ) . filter ( Boolean ) ) ;
51+ const dedupedPersonalDetails = searchOptions . personalDetails . filter ( ( option ) => ! recentReportLogins . has ( option . login ) ) ;
52+
5053 const headerMessage = getHeaderMessage (
51- ( searchOptions . recentReports ?. length || 0 ) + ( searchOptions . personalDetails ?. length || 0 ) !== 0 ,
54+ ( searchOptions . recentReports ?. length || 0 ) + ( dedupedPersonalDetails ?. length || 0 ) !== 0 ,
5255 ! ! searchOptions . userToInvite ,
5356 debouncedSearchTerm ,
5457 countryCode ,
@@ -62,7 +65,7 @@ function AddDelegatePage() {
6265 {
6366 title : translate ( 'common.contacts' ) ,
6467 sectionIndex : 1 ,
65- data : searchOptions . personalDetails ,
68+ data : dedupedPersonalDetails ,
6669 } ,
6770 ] ;
6871
You can’t perform that action at this time.
0 commit comments