import { Link, Outlet, useNavigate } from 'react-router-dom'; import * as authApi from '../api/auth'; import { useAuth } from '../context/AuthContext'; export function AdminLayout() { const { signOut } = useAuth(); const navigate = useNavigate(); const handleLogout = async () => { try { await authApi.logout(); } catch { /* ignore */ } signOut(); navigate('/login'); }; return (
); }