File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
apps/frontend/app/components Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,7 @@ export const CollectionsFilter = (props: {
508
508
collections ?: string [ ] ;
509
509
invertCollection ?: boolean ;
510
510
} ) => {
511
+ const userDetails = useUserDetails ( ) ;
511
512
const collections = useUserCollections ( ) ;
512
513
const [ _ , { setP } ] = useAppSearchParam ( props . cookieName ) ;
513
514
@@ -516,18 +517,25 @@ export const CollectionsFilter = (props: {
516
517
flex = { 1 }
517
518
clearable
518
519
searchable
519
- rightSectionWidth = { rem ( 100 ) }
520
520
rightSectionPointerEvents = "all"
521
521
defaultValue = { props . collections }
522
522
placeholder = "Select a collection"
523
+ rightSectionWidth = { rem ( 100 ) }
523
524
onChange = { ( v ) => setP ( "collections" , v . join ( "," ) ) }
524
525
data = { [
525
526
{
526
527
group : "My collections" ,
527
- items : collections . map ( ( c ) => ( {
528
- value : c . id . toString ( ) ,
529
- label : c . name ,
530
- } ) ) ,
528
+ items : collections
529
+ . filter (
530
+ ( c ) =>
531
+ c . collaborators . find (
532
+ ( c ) => c . collaborator . id === userDetails . id ,
533
+ ) ?. extraInformation ?. isHidden !== true ,
534
+ )
535
+ . map ( ( c ) => ( {
536
+ label : c . name ,
537
+ value : c . id . toString ( ) ,
538
+ } ) ) ,
531
539
} ,
532
540
] }
533
541
rightSection = {
You can’t perform that action at this time.
0 commit comments