fix(F-06): auto-open crop editor after image upload on item detail
Added onCropChange and dominantColor props to ImageUpload in the item detail page, so the crop editor opens automatically after uploading a new image. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -273,9 +273,18 @@ function ItemDetail() {
|
||||
<ImageUpload
|
||||
value={form.imageFilename}
|
||||
imageUrl={imageUrl}
|
||||
dominantColor={item.dominantColor}
|
||||
onChange={(filename) =>
|
||||
setForm((f) => ({ ...f, imageFilename: filename }))
|
||||
}
|
||||
onCropChange={(crop) => {
|
||||
updateItem.mutate({
|
||||
id: item.id,
|
||||
cropZoom: crop.zoom,
|
||||
cropX: crop.x,
|
||||
cropY: crop.y,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
) : editingCrop && imageUrl ? (
|
||||
|
||||
Reference in New Issue
Block a user