fix: code review cleanup
- Fixed TypeScript exactOptionalPropertyTypes errors in chat components - Removed console.error statements (errors are handled via state) - Fixed type compatibility issues with undefined vs null values - All chat-related files now pass strict TypeScript checks
This commit is contained in:
@@ -54,9 +54,9 @@ export const ConversationSidebar = forwardRef<ConversationSidebarRef, Conversati
|
||||
|
||||
return {
|
||||
id: idea.id,
|
||||
title: idea.title,
|
||||
projectId: idea.projectId,
|
||||
updatedAt: idea.updatedAt,
|
||||
title: idea.title ?? null,
|
||||
projectId: idea.projectId ?? null,
|
||||
updatedAt: idea.updatedAt ?? null,
|
||||
messageCount,
|
||||
};
|
||||
}, []);
|
||||
@@ -84,7 +84,7 @@ export const ConversationSidebar = forwardRef<ConversationSidebarRef, Conversati
|
||||
} catch (err) {
|
||||
const errorMsg = err instanceof Error ? err.message : "Failed to load conversations";
|
||||
setError(errorMsg);
|
||||
console.error("Error fetching conversations:", err);
|
||||
// Error is set to state and will be displayed to the user
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user