diff --git a/src/photo/form/PhotoForm.tsx b/src/photo/form/PhotoForm.tsx index 5faac6b7..b9443e70 100644 --- a/src/photo/form/PhotoForm.tsx +++ b/src/photo/form/PhotoForm.tsx @@ -142,27 +142,34 @@ export default function PhotoForm({ isLoadingDescriptionLarge, ] = useImageQuery(imageData, 'descriptionLarge'); + const renderAiButton = ( + label: string, + onClick: () => void, + isLoading: boolean, + ) => + ; + return (
-
- - - - +
+ {renderAiButton('Title', requestTitle, isLoadingTitle)} + {renderAiButton('Tags', requestTags, isLoadingTags)} + {renderAiButton( + 'Description (S)', + requestDescriptionSmall, + isLoadingDescriptionSmall, + )} + {renderAiButton( + 'Description (L)', + requestDescriptionLarge, + isLoadingDescriptionLarge, + )}