From abbc2f0d2a474adb52b3c29fae9a052ee161768e Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:47:26 +0530 Subject: [PATCH] show laoding state on create project screen --- .../components/build-assistant-section.tsx | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/apps/rowboat/app/projects/components/build-assistant-section.tsx b/apps/rowboat/app/projects/components/build-assistant-section.tsx index 7081b03d..324baba6 100644 --- a/apps/rowboat/app/projects/components/build-assistant-section.tsx +++ b/apps/rowboat/app/projects/components/build-assistant-section.tsx @@ -108,22 +108,18 @@ export function BuildAssistantSection({ defaultName }: BuildAssistantSectionProp }, []); const handleCreateAssistant = async () => { - if (!userPrompt.trim()) { - setPromptError("Prompt cannot be empty"); - return; - } - setIsCreating(true); try { await createProjectWithOptions({ name: defaultName, - prompt: userPrompt, + prompt: userPrompt.trim(), router, onError: (error) => { console.error('Error creating project:', error); } }); - } finally { + } catch (error) { + console.error('Error creating project:', error); setIsCreating(false); } }; @@ -171,15 +167,6 @@ export function BuildAssistantSection({ defaultName }: BuildAssistantSectionProp } }; - // Handle "I'll build it myself" button - const handleBuildItMyself = async () => { - await createProjectWithOptions({ - name: defaultName, - template: 'default', - router - }); - }; - return ( <>