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>
25 lines
650 B
TypeScript
25 lines
650 B
TypeScript
export const MobileNav = (
|
|
{ navItems, currentPath }: { navItems: any[]; currentPath: string },
|
|
) => {
|
|
return (
|
|
<nav class="mobile-bottom-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>
|
|
);
|
|
};
|