import type { ReactNode } from 'react' import { NavLink } from 'react-router-dom' import { LogOut, PhoneOutgoing, Radio, Zap } from 'lucide-react' import { useZino } from '../zino-sdk' const navItem = 'inline-flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors' export default function Layout({ children }: { children: ReactNode }) { const { auth, client } = useZino() const signOut = () => { auth.logout() // The router is inside the auth gate in App, so a reload is the simplest // way back to the login screen without threading state through context. window.location.reload() } const email = (() => { try { const t = client.getToken() if (!t) return '' return JSON.parse(atob(t.split('.')[1])).email ?? '' } catch { return '' } })() return (