diff --git a/frontend/utils/routeUtils.ts b/frontend/utils/routeUtils.ts index d05c18098..ea9befffe 100644 --- a/frontend/utils/routeUtils.ts +++ b/frontend/utils/routeUtils.ts @@ -1,5 +1,4 @@ -export function isRouteActive(routePath: string): boolean { - const route = useRoute(); + /** * Normalize a given path by removing leading and trailing slashes. */ @@ -7,6 +6,9 @@ function normalizePath(path: string): string { return path.replace(/^\/|\/$/g, ''); } +export function isRouteActive(routePath: string): boolean { + const route = useRoute(); + const currentPath = normalizePath(route.path); const targetPath = normalizePath(routePath);