From b9cae19916d3ef5a646b307c63bc2590e1d2d30a Mon Sep 17 00:00:00 2001 From: Riccardo Giorato Date: Tue, 6 Jan 2026 13:48:37 +0100 Subject: [PATCH] Removed debug logging from StoryEditorClient and added autoFocus to prom --- app/story/[storySlug]/story-editor-client.tsx | 7 ++----- components/editor/generate-page-modal.tsx | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/story/[storySlug]/story-editor-client.tsx b/app/story/[storySlug]/story-editor-client.tsx index f6f1c27..acaa741 100644 --- a/app/story/[storySlug]/story-editor-client.tsx +++ b/app/story/[storySlug]/story-editor-client.tsx @@ -82,16 +82,13 @@ export function StoryEditorClient() { } const result = await response.json(); - console.log("Editor: full API response:", result); - + const { story: storyData, pages: pagesData, isOwner: ownerStatus, } = result; - - console.log("Editor: received story data:", storyData); - + setStory(storyData); setIsOwner(ownerStatus ?? false); // Default to false if undefined setPages( diff --git a/components/editor/generate-page-modal.tsx b/components/editor/generate-page-modal.tsx index fce75cb..dfd0697 100644 --- a/components/editor/generate-page-modal.tsx +++ b/components/editor/generate-page-modal.tsx @@ -67,6 +67,8 @@ export function GeneratePageModal({ setShowPreview(null); setIsGenerating(false); + + // Initialize characters list with existing ones const existingItems: CharacterItem[] = existingCharacters.map((url) => ({ url, @@ -326,6 +328,7 @@ export function GeneratePageModal({