Skip to content

Commit e59147c

Browse files
Juan Castañojuancastano
authored andcommitted
Fix build errors
1 parent 0ad314c commit e59147c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/api/generate/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export async function POST(request: NextRequest) {
7171
}
7272
} catch (error) {
7373
// Continue with original files if fixer fails
74+
console.error('Fixer failed:', error);
7475
}
7576
}
7677

components/ui-builder/code-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export function CodeEditor({ files = [] }: CodeEditorProps) {
9999
if (!selectedFilePath && files.length > 0) {
100100
setSelectedFilePath(files[0].path);
101101
}
102-
}, [files.length, selectedFilePath]); // Use files.length instead of files array
102+
}, [files, selectedFilePath]); // Include files since we access files[0]
103103

104104
// Get file icon based on extension
105105
const getFileIcon = (path: string) => {

components/ui-builder/prompt-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function PromptForm() {
5050
} else if (!watchUseBuggyCode && currentDescription === buggyCodeText) {
5151
form.setValue('description', '');
5252
}
53-
}, [watchUseBuggyCode]);
53+
}, [watchUseBuggyCode, currentDescription, form]);
5454

5555
async function onSubmit(values: z.infer<typeof formSchema>) {
5656
// Store the prompt and settings in sessionStorage and navigate immediately

0 commit comments

Comments
 (0)