0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

refactor(console): do not parameterize guide id (#5863)

This commit is contained in:
Gao Sun 2024-05-14 15:27:07 +08:00 committed by GitHub
parent 1c414f1889
commit bec2720c7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}