1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +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:
Jaanus Sellin 2024-11-05 12:35:09 +02:00 committed by GitHub
parent 1897f8a19d
commit bfa9e0d6b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,6 +70,7 @@ const StyledBadge = styled(Badge)(({ theme }) => ({
interface ITab {
title: string;
path: string;
ossPath?: string;
name: string;
flag?: keyof UiFlags;
new?: boolean;
@ -180,7 +181,8 @@ export const Project = () => {
},
{
title: 'Project settings',
path: `${basePath}/settings${isOss() ? '/environments' : ''}`,
path: `${basePath}/settings`,
ossPath: `${basePath}/settings/api-access`,
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}`}
iconPosition={