feat: sélection manuelle de produit Shopify quand réf. introuvable

This commit is contained in:
2026-06-09 21:00:45 +02:00
parent 071f126244
commit d1e78e91e4
3 changed files with 69 additions and 2 deletions
+8 -1
View File
@@ -257,5 +257,12 @@ export function useImages() {
dispatch({ type: 'REMOVE', id })
}, [])
return { items, addFiles, setFeather, rotate, uploadOne, uploadAll, removeItem }
const assignProduct = useCallback(
(id: string, shopifyProductId: string, shopifyProductTitle: string) => {
update(id, { shopifyProductId, shopifyProductTitle, status: 'ready' })
},
[update],
)
return { items, addFiles, setFeather, rotate, uploadOne, uploadAll, removeItem, assignProduct }
}