import { Outlet } from 'react-router-dom';
import { SessionProvider } from '@/session/SessionContext';

/**
 * Root route element. Mounts SessionProvider once for the entire app so
 * every nested route — login, app shell, fallback — shares one session
 * state. Kept in its own file so router.tsx exports only the router
 * config (fast-refresh friendly).
 */
export function Root() {
  return (
    <SessionProvider>
      <Outlet />
    </SessionProvider>
  );
}
