user management ui

This commit is contained in:
yaschalew
2026-07-10 10:41:48 +03:00
parent dcb2d98503
commit 28a20923ff
595 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import { t } from "i18next";
export type ModuleKey = "objective" | "performance";
export const ROUTE_CONFIG: Record<
ModuleKey,
{
basePath: string;
planYearsPath: string;
navLabelKey: string;
}
> = {
performance: {
basePath: "/performance-management",
planYearsPath: "/performance-management/plan-years",
navLabelKey: "nav.performanceManagement",
},
objective: {
basePath: "/objective-management",
planYearsPath: "/objective-management/plan-years",
navLabelKey: "nav.objectiveManagement",
},
};

View File

@@ -0,0 +1,12 @@
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";
}