diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index a5cad96b..f0cd114f 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -241,6 +241,7 @@ export const AuthProvider = AuthProviderComponent; export function useAuth() { const context = useContext(AuthContext); if (context === undefined) { + console.error('[useAuth] AuthContext is undefined - component may be rendering outside AuthProvider'); throw new Error('useAuth must be used within an AuthProvider'); } return context;