File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
scp-teacher-repo/src/components Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -423,12 +423,18 @@ const Header: React.FC<HeaderProps> = ({ toggleDrawer, openDrawer }) => {
423423 if ( storedTenantData ) {
424424 try {
425425 const parsedTenantData = JSON . parse ( storedTenantData ) ;
426- setTenantData ( parsedTenantData ) ;
426+
427+ // Filter out pragyanpath tenant
428+ const filteredTenantData = parsedTenantData . filter (
429+ ( tenant : any ) => tenant ?. tenantName ?. toLowerCase ( ) !== 'pragyanpath'
430+ ) ;
431+
432+ setTenantData ( filteredTenantData ) ;
427433
428434 // Show switch button if there are multiple tenants or multiple roles in any tenant
429435 const shouldShowButton =
430- parsedTenantData . length > 1 ||
431- parsedTenantData . some ( ( tenant : any ) => tenant ?. roles ?. length > 1 ) ;
436+ filteredTenantData . length > 1 ||
437+ filteredTenantData . some ( ( tenant : any ) => tenant ?. roles ?. length > 1 ) ;
432438 setShowSwitchButton ( shouldShowButton ) ;
433439 } catch ( error ) {
434440 console . error ( 'Error parsing tenantData:' , error ) ;
Original file line number Diff line number Diff line change @@ -92,12 +92,17 @@ const Header: React.FC<HeaderProps> = ({ toggleDrawer, openDrawer }) => {
9292 if ( storedTenantData ) {
9393 try {
9494 const parsedTenantData = JSON . parse ( storedTenantData ) ;
95- setTenantData ( parsedTenantData ) ;
95+ const filteredTenantData = parsedTenantData . filter (
96+ ( tenant : any ) => tenant ?. tenantName ?. toLowerCase ( ) !== 'pragyanpath'
97+ ) ;
98+
99+ setTenantData ( filteredTenantData ) ;
100+
96101
97102 // Show switch button if there are multiple tenants or multiple roles in any tenant
98103 const shouldShowButton =
99- parsedTenantData . length > 1 ||
100- parsedTenantData . some ( ( tenant : any ) => tenant ?. roles ?. length > 1 ) ;
104+ filteredTenantData . length > 1 ||
105+ filteredTenantData . some ( ( tenant : any ) => tenant ?. roles ?. length > 1 ) ;
101106 setShowSwitchButton ( shouldShowButton ) ;
102107 } catch ( error ) {
103108 console . error ( 'Error parsing tenantData:' , error ) ;
You can’t perform that action at this time.
0 commit comments