@@ -637,6 +637,34 @@ export function useNavigationItems(): Array<
637637 href : generatePath ( absoluteRouteMap . children . org . children . catalog . path , { orgId } ) ,
638638 isActive : ! ! matchPath ( absoluteRouteMap . children . org . children . catalog . wildPath , pathname ) ,
639639 } ,
640+ ...( ( ) => {
641+ const identityItems = [
642+ ...( navVisibility . identityUsers ? [ {
643+ label : "Users" ,
644+ type : "item" as const ,
645+ icon : < Users size = { 20 } /> ,
646+ href : generatePath ( identitiesOrgRoute . children . users . path , { orgId } ) ,
647+ isActive : ! ! matchPath ( identitiesOrgRoute . children . users . wildPath , pathname ) ,
648+ } ] : [ ] ) ,
649+ ...( navVisibility . identityRoles ? [ {
650+ label : "Roles" ,
651+ type : "item" as const ,
652+ icon : < Shield size = { 20 } /> ,
653+ href : generatePath ( identitiesOrgRoute . children . roles . path , { orgId } ) ,
654+ isActive : ! ! matchPath ( identitiesOrgRoute . children . roles . wildPath , pathname ) ,
655+ } ] : [ ] ) ,
656+ ...( navVisibility . identityGroups ? [ {
657+ label : "Groups" ,
658+ type : "item" as const ,
659+ icon : < Folder size = { 20 } /> ,
660+ href : generatePath ( identitiesOrgRoute . children . groups . path , { orgId } ) ,
661+ isActive : ! ! matchPath ( identitiesOrgRoute . children . groups . wildPath , pathname ) ,
662+ } ] : [ ] ) ,
663+ ] ;
664+ return identityItems . length > 0
665+ ? [ { title : identitiesMetadata . title , type : "section" as const , icon : < identitiesMetadata . icon size = { 20 } /> , items : identityItems } ]
666+ : [ ] ;
667+ } ) ( ) ,
640668 ...( navVisibility . resources
641669 ? [
642670 {
@@ -691,34 +719,6 @@ export function useNavigationItems(): Array<
691719 } ,
692720 ]
693721 : [ ] ) ,
694- ...( ( ) => {
695- const identityItems = [
696- ...( navVisibility . identityUsers ? [ {
697- label : "Users" ,
698- type : "item" as const ,
699- icon : < Users size = { 20 } /> ,
700- href : generatePath ( identitiesOrgRoute . children . users . path , { orgId } ) ,
701- isActive : ! ! matchPath ( identitiesOrgRoute . children . users . wildPath , pathname ) ,
702- } ] : [ ] ) ,
703- ...( navVisibility . identityRoles ? [ {
704- label : "Roles" ,
705- type : "item" as const ,
706- icon : < Shield size = { 20 } /> ,
707- href : generatePath ( identitiesOrgRoute . children . roles . path , { orgId } ) ,
708- isActive : ! ! matchPath ( identitiesOrgRoute . children . roles . wildPath , pathname ) ,
709- } ] : [ ] ) ,
710- ...( navVisibility . identityGroups ? [ {
711- label : "Groups" ,
712- type : "item" as const ,
713- icon : < Folder size = { 20 } /> ,
714- href : generatePath ( identitiesOrgRoute . children . groups . path , { orgId } ) ,
715- isActive : ! ! matchPath ( identitiesOrgRoute . children . groups . wildPath , pathname ) ,
716- } ] : [ ] ) ,
717- ] ;
718- return identityItems . length > 0
719- ? [ { title : identitiesMetadata . title , type : "section" as const , icon : < identitiesMetadata . icon size = { 20 } /> , items : identityItems } ]
720- : [ ] ;
721- } ) ( ) ,
722722 ...externalNavItems . filter ( item => item . level === "org" ) . map ( item => ( {
723723 label : item . title ,
724724 type : "item" as const ,
0 commit comments