Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
encode projectId for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon committed Oct 12, 2023
1 parent 5f65b76 commit 6b8a907
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,9 @@ export const getProjectSettingsRoute = (
projectId: string,
tab?: ProjectSettingsTabRoutes
) => {
if (!tab) {
return `${paths.project}/${projectId}/${PageNames.Settings}`;
}

return `${paths.project}/${projectId}/${PageNames.Settings}/${tab}`;
const encodedProjectId = encodeURIComponent(projectId);
const root = `${paths.project}/${encodedProjectId}/${PageNames.Settings}`;
return tab ? `${root}/${tab}` : root;
};

export const getDistroSettingsRoute = (
Expand Down

0 comments on commit 6b8a907

Please sign in to comment.