'use client'; import { useAuth } from '@/lib/contexts/AuthContext'; import { Loader2 } from 'lucide-react'; export default function SettingsLayout({ children }: { children: React.ReactNode }) { const { isIdentityUnlocked, isRestoring, loading } = useAuth(); // Show loading while restoring or initial load if (loading || isRestoring) { return (
); } // If not unlocked after restoration, user needs to re-login // (This is rare - only happens if browser was closed or session expired) if (!isIdentityUnlocked) { return (

Session Expired

Your session has expired. Please log out and log back in to access settings.

); } return <>{children}; }