diff --git a/web/src/hooks/barItems.tsx b/web/src/hooks/barItems.tsx index 24bb489..bb9f771 100644 --- a/web/src/hooks/barItems.tsx +++ b/web/src/hooks/barItems.tsx @@ -1,5 +1,5 @@ import { useAuth } from "@/store/auth"; -import { Blocks, Home, Settings2, User } from "lucide-react"; +import { Blocks, Home, Settings2, User, Users } from "lucide-react"; import { useCallback, type ReactNode } from "react"; import { useLocation } from "react-router"; @@ -16,7 +16,8 @@ export const useBarItems = (): [BarItem[], (item: BarItem) => boolean] => { const isActive = useCallback( (item: BarItem) => { - return location.pathname === item.pathname; + if (item.pathname === "/") return location.pathname === item.pathname; + return location.pathname.startsWith(item.pathname); }, [location.pathname], ); @@ -50,9 +51,15 @@ export const useBarItems = (): [BarItem[], (item: BarItem) => boolean] => { { icon: , title: "API Services", - tab: "api-services", + tab: "admin.api-services", pathname: "/admin/api-services", }, + { + icon: , + title: "Users", + tab: "admin.users", + pathname: "/admin/users", + }, ] : []), ],