Skip to content

Commit

Permalink
refactor(console): do not parameterize guide id (#5863)
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun authored May 14, 2024
1 parent 1c414f1 commit bec2720
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/console/src/utils/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export const getRoutePattern = (pathname: string, routes: RouteObject[]) => {
}

// If the path is not a parameter, or it's an ID parameter, use the path as is.
if (!segment.startsWith(':') || segment.endsWith('Id') || segment.endsWith('id')) {
// Exception: For `:guideId`, we want to use the parameter value for better analytics.
if (
segment !== ':guideId' &&
(!segment.startsWith(':') || segment.endsWith('Id') || segment.endsWith('id'))
) {
return segment;
}

Expand Down

0 comments on commit bec2720

Please sign in to comment.