// modules/admin/pages/UsersDashboard.jsx import { Tabs, TabsList, TabsTrigger } from "@/components/custom/original-tabs"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; import DashboardGrid from "@/components/generic/DashboardGrid"; import { ADMIN_SECTIONS } from "@/data/adminTiles.data"; function scrollTo(sectionId) { document.getElementById(sectionId)?.scrollIntoView({ behavior: "smooth", block: "start" }); } export default function AdminDashboard() { return (
{/* ── Sticky tab bar — driven by the same array ── */}
{ADMIN_SECTIONS.map((s) => ( s.id === ADMIN_SECTIONS[0].id ? window.scrollTo({ top: 0, behavior: "smooth" }) : scrollTo(s.id) } className="data-[state=active]:bg-muted data-[state=active]:shadow-none hover:bg-muted text-muted-foreground data-[state=active]:text-foreground" > {s.tab} ))}
{/* ── Sections — same array, one DashboardGrid per entry ── */} {ADMIN_SECTIONS.map((s) => (
{s.tiles.length > 0 ? ( ) : (

{s.title}

No items yet.

)}
))}
); }