import React, { useState } from 'react' import { Link } from '@tanstack/react-router' import { LayoutDashboard, Send, Settings2, MapPin, UserPlus, Menu, X, LogOut, Store, Package } from 'lucide-react' import { useAuth } from '../lib/auth-context' const NAV = [ { to: '/dashboard', label: 'Dashboard', icon: LayoutDashboard }, { to: '/admins', label: 'Admins', icon: UserPlus }, { to: '/regions', label: 'Regions', icon: MapPin }, { to: '/stores', label: 'Stores', icon: Store }, { to: '/products', label: 'Products', icon: Package }, { to: '/send-notifications', label: 'Send Admin Notifications', icon: Send }, { to: '/constants', label: 'App Constants', icon: Settings2 }, ] as const export function AppShell({ children }: { children: React.ReactNode }) { const [open, setOpen] = useState(false) const { staff, logout } = useAuth() return (
Freshyo Superadmin
{staff?.name && ( {staff.name} )}
{open && (
setOpen(false)} /> )}
{children}
) } export default AppShell