Skip to content

Commit 6c56610

Browse files
committed
style: format trailing commas and whitespace in image generation code
1 parent ae769ea commit 6c56610

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

src/components/ImgGen.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,20 @@ function ImgGenCore(props: ImgGenProps): React.ReactElement {
225225
if (options?.debug) {
226226
console.log('[ImgGen Debug] Render state:', {
227227
isPlaceholder,
228-
document: document ? {
229-
_id: document._id,
230-
_files: document._files ? Object.keys(document._files) : null,
231-
hasPrompts: !!document.prompts,
232-
currentPromptKey: document.currentPromptKey || null,
233-
hasPrompt: !!document.prompt,
234-
docType: document.type || null
235-
} : null,
228+
document: document
229+
? {
230+
_id: document._id,
231+
_files: document._files ? Object.keys(document._files) : null,
232+
hasPrompts: !!document.prompts,
233+
currentPromptKey: document.currentPromptKey || null,
234+
hasPrompt: !!document.prompt,
235+
docType: document.type || null,
236+
}
237+
: null,
236238
loading,
237239
error: error?.message,
238240
currentEditedPrompt: currentEditedPrompt || null,
239-
imageData: !!imageData
241+
imageData: !!imageData,
240242
});
241243
}
242244
// If we don't have a prompt or ID, show the waiting component

src/components/ImgGenUtils/ImgGenDisplay.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,17 @@ export function ImgGenDisplay({
303303
loading,
304304
error: error?.message,
305305
totalVersions,
306-
promptText
306+
promptText,
307307
});
308308
}
309-
309+
310310
if (!document._files || (!fileKey && !document._files.image)) {
311311
if (debug) {
312312
console.log('[ImgGenDisplay Debug] Missing image file - showing error', {
313313
hasFiles: !!document._files,
314314
fileKey,
315315
defaultImageExists: !!document._files?.image,
316-
loading
316+
loading,
317317
});
318318
}
319319
return <ImgGenError message="Missing image file" />;

src/hooks/image-gen/use-image-gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,18 +357,18 @@ export function useImageGen({
357357
) {
358358
// Use the document's prompt to generate an image
359359
console.log(`Document ${_id} has no files but has prompt, generating image`);
360-
360+
361361
// Extended debug info
362362
if (options?.debug) {
363363
console.log('[ImgGen Debug] Document found with prompt but no files:', {
364364
docId: existingDoc._id,
365365
docPrompt: existingDoc.prompt,
366366
settingLoading: true,
367367
settingDocument: true,
368-
loadingValue: loading
368+
loadingValue: loading,
369369
});
370370
}
371-
371+
372372
const docPrompt = existingDoc.prompt;
373373

374374
// Set loading state to true to show progress indicator

0 commit comments

Comments
 (0)