'use client';
import Link from 'next/link';
import { usePathname, useRouter } from 'next/navigation';
import { EDITABLE_SECTIONS } from '@/lib/content/sections';
import { cn } from '@/lib/utils';
export function AdminShell({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
const router = useRouter();
async function logout() {
await fetch('/api/admin/logout', { method: 'POST' });
router.replace('/admin/login');
router.refresh();
}
return (
{/* Sidebar */}
{/* Mobile top bar */}
{/* Mobile section selector */}
{children}
);
}
function SideLink({
href,
active,
children,
}: {
href: string;
active: boolean;
children: React.ReactNode;
}) {
return (
{children}
);
}
function MobileChip({
href,
active,
label,
}: {
href: string;
active: boolean;
label: string;
}) {
return (
{label}
);
}