Removes every other screen, API route, component, test and the dependencies only they used. Cookie colite_admin, Co-Lite branding, BO_USERS/BO_ROLES modules only. The user form no longer loads branches, events or country scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
17 lines
635 B
TypeScript
17 lines
635 B
TypeScript
"use client";
|
|
|
|
import { useMemo } from "react";
|
|
import { useAdminAuth } from "@/app/lib/AdminAuthContext";
|
|
import { sidebarFromAclMenu, type SidebarLink } from "@/app/lib/aclSidebar";
|
|
|
|
/**
|
|
* Sidebar entries derived from the signed-in user's live aclMenu (via
|
|
* AdminAuthContext). Task 6 wires this directly into the sidebar shell
|
|
* component in place of the static src/components/app/nav-config.ts list.
|
|
* Order and grouping follow the aclMenu tree (siblings by module id);
|
|
*/
|
|
export function useAclSidebar(): SidebarLink[] {
|
|
const { aclMenu } = useAdminAuth();
|
|
return useMemo(() => sidebarFromAclMenu(aclMenu), [aclMenu]);
|
|
}
|