import React, { type ReactNode } from 'react'; import { useAuth } from './AdminAuth'; const navItems = [ { href: '/admin', label: 'Dashboard', icon: '๐Ÿ“Š' }, { href: '/admin/revenue', label: 'Revenue', icon: '๐Ÿ’ฐ' }, { href: '/admin/performance', label: 'Performance', icon: '๐Ÿ”ฅ' }, { href: '/admin/homepage', label: 'Homepage', icon: '๐Ÿ ' }, { href: '/admin/feeds', label: 'Feeds', icon: '๐Ÿ“ก' }, { href: '/admin/feeds/health', label: 'Feed Health', icon: '๐Ÿฉบ' }, { href: '/admin/data-quality', label: 'Data Quality', icon: '๐Ÿงน' }, { href: '/admin/products', label: 'Products', icon: '๐Ÿ“ฆ' }, { href: '/admin/collections', label: 'Collections', icon: '๐Ÿ“' }, { href: '/admin/analytics', label: 'Analytics', icon: '๐Ÿ“ˆ' }, { href: '/admin/emails', label: 'Email', icon: '๐Ÿ“ง' }, { href: '/admin/emails/editor', label: 'Email Editor', icon: 'โœ๏ธ' }, { href: '/admin/subscribers', label: 'Subscribers', icon: '๐Ÿ‘ฅ' }, { href: '/admin/crons', label: 'Crons', icon: 'โฐ' }, ]; function NavLink({ href, label, icon }: { href: string; label: string; icon: string }) { const active = typeof window !== 'undefined' && (window.location.pathname === href || (href !== '/admin' && window.location.pathname.startsWith(href))); return ( {icon} {label} ); } export default function AdminLayout({ children, title }: { children: ReactNode; title: string }) { const { user, logout } = useAuth(); return (
{/* Sidebar */} {/* Main */}

{title}

{children}
); }