google-labs-jules[bot] c8cf9c7df7 refactor(ui): extract layout and sessions subcomponents
Extract Navbar, MobileNav, and UserMenu from AuthenticatedLayout.tsx.
Extract SessionTable, SessionDeck, and SessionsScript from SessionsPage.tsx.
Preserves existing pure Hono SSR JSX and logic.

Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
2026-08-26 06:38:22 +00:00

41 lines
1.0 KiB
TypeScript

export const Navbar = (
{ navItems, currentPath, children }: {
navItems: any[];
currentPath: string;
children?: any;
},
) => {
return (
<header class="top-bar">
<div style="display: flex; align-items: center;">
<a href="/dashboard" class="brand">
<span class="brand-badge">AY</span>
<span>Auth-Yes</span>
</a>
{/* Desktop Nav Links */}
<nav class="desktop-nav">
{navItems.map((item: any) => {
const isActive = item.href === "/dashboard"
? currentPath === "/dashboard"
: currentPath.startsWith(item.href) &&
item.href !== "/dashboard";
return (
<a
href={item.href}
class={isActive ? "active" : ""}
>
<span dangerouslySetInnerHTML={{ __html: item.icon }} />
<span>{item.label}</span>
</a>
);
})}
</nav>
</div>
{children}
</header>
);
};