Files
edr-platform/apps/edr-freight-web/backoffice/src/shared/routes/useActiveModule.ts
2026-07-10 10:41:48 +03:00

13 lines
287 B
TypeScript

import { useLocation } from "react-router-dom";
import { ModuleKey } from "./routeConfig";
export function useActiveModule(): ModuleKey {
const { pathname } = useLocation();
if (pathname.startsWith("/objective-management")) {
return "objective";
}
return "performance";
}