mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-06 14:45:04 +00:00
13 lines
287 B
TypeScript
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";
|
|
}
|