feat: sélection manuelle de produit Shopify quand réf. introuvable
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user