mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: fix project settings path for oss (#8650)
**Issue fix:** Resolves #8618, where environments were incorrectly appended to the route. **Change:** Introduces `ossPath` specifically for OSS users, as OSS lacks the default `/settings` path, starting instead from `api-access`.
This commit is contained in:
		
							parent
							
								
									1897f8a19d
								
							
						
					
					
						commit
						bfa9e0d6b4
					
				@ -70,6 +70,7 @@ const StyledBadge = styled(Badge)(({ theme }) => ({
 | 
				
			|||||||
interface ITab {
 | 
					interface ITab {
 | 
				
			||||||
    title: string;
 | 
					    title: string;
 | 
				
			||||||
    path: string;
 | 
					    path: string;
 | 
				
			||||||
 | 
					    ossPath?: string;
 | 
				
			||||||
    name: string;
 | 
					    name: string;
 | 
				
			||||||
    flag?: keyof UiFlags;
 | 
					    flag?: keyof UiFlags;
 | 
				
			||||||
    new?: boolean;
 | 
					    new?: boolean;
 | 
				
			||||||
@ -180,7 +181,8 @@ export const Project = () => {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            title: 'Project settings',
 | 
					            title: 'Project settings',
 | 
				
			||||||
            path: `${basePath}/settings${isOss() ? '/environments' : ''}`,
 | 
					            path: `${basePath}/settings`,
 | 
				
			||||||
 | 
					            ossPath: `${basePath}/settings/api-access`,
 | 
				
			||||||
            name: 'settings',
 | 
					            name: 'settings',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
@ -327,7 +329,11 @@ export const Project = () => {
 | 
				
			|||||||
                                                },
 | 
					                                                },
 | 
				
			||||||
                                            });
 | 
					                                            });
 | 
				
			||||||
                                        }
 | 
					                                        }
 | 
				
			||||||
                                        navigate(tab.path);
 | 
					                                        navigate(
 | 
				
			||||||
 | 
					                                            isOss() && tab.ossPath
 | 
				
			||||||
 | 
					                                                ? tab.ossPath
 | 
				
			||||||
 | 
					                                                : tab.path,
 | 
				
			||||||
 | 
					                                        );
 | 
				
			||||||
                                    }}
 | 
					                                    }}
 | 
				
			||||||
                                    data-testid={`TAB_${tab.title}`}
 | 
					                                    data-testid={`TAB_${tab.title}`}
 | 
				
			||||||
                                    iconPosition={
 | 
					                                    iconPosition={
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user