diff --git a/frontend/src/app/(main)/page.tsx b/frontend/src/app/(main)/page.tsx index c79110d6..1f942a76 100644 --- a/frontend/src/app/(main)/page.tsx +++ b/frontend/src/app/(main)/page.tsx @@ -29,16 +29,17 @@ export default function HomePage() { if (!message.trim()) return; try { - // Create the project - const result = await createProjectFromPrompt(message, isPublic, model); + // Create the project + const result = await createProjectFromPrompt(message, isPublic, model); - // If successful, clear the input - if (result) { - promptFormRef.current.clearMessage(); + // If successful, clear the input + if (result) { + promptFormRef.current.clearMessage(); - // Note: No need to navigate here as the ProjectContext's onCompleted handler - // in the createProject mutation will handle navigation to the chat page - }} catch (error) { + // Note: No need to navigate here as the ProjectContext's onCompleted handler + // in the createProject mutation will handle navigation to the chat page + } + } catch (error) { console.error('Error creating project:', error); } }; @@ -106,14 +107,8 @@ export default function HomePage() { /> {/* SignInModal & SignUpModal */} - setShowSignIn(false)} - /> - setShowSignUp(false)} - /> + setShowSignIn(false)} /> + setShowSignUp(false)} />