Skip to content

Commit

Permalink
fix: fix project settings path for oss (#8650)
Browse files Browse the repository at this point in the history
**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`.
  • Loading branch information
sjaanus authored Nov 5, 2024
1 parent 1897f8a commit bfa9e0d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/component/project/Project/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const StyledBadge = styled(Badge)(({ theme }) => ({
interface ITab {
title: string;
path: string;
ossPath?: string;
name: string;
flag?: keyof UiFlags;
new?: boolean;
Expand Down Expand Up @@ -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',
},
];
Expand Down Expand Up @@ -327,7 +329,11 @@ export const Project = () => {
},
});
}
navigate(tab.path);
navigate(
isOss() && tab.ossPath
? tab.ossPath
: tab.path,
);
}}
data-testid={`TAB_${tab.title}`}
iconPosition={
Expand Down

0 comments on commit bfa9e0d

Please sign in to comment.