import type { Metadata } from 'next'; import './globals.css'; import { cookies } from 'next/headers'; import { redirect } from 'next/navigation'; import { verifyToken } from '@/lib/auth'; export const metadata: Metadata = { title: 'Nexus - VM Control Center', description: 'Secure VM monitoring and management platform', }; export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { const cookieStore = await cookies(); const token = cookieStore.get('auth-token')?.value; const pathname = typeof window !== 'undefined' ? window.location.pathname : ''; // Check if we're on login page (we can't use usePathname in server component) // So we'll handle this in the login page itself return ( {children} ); }