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