feat: Add support for product export in UI (#8281)
* feat: Add support for product export in UI * fix:Return the backend URL for private files of local file provider
This commit is contained in:
@@ -326,3 +326,20 @@ export const useDeleteProduct = (
|
||||
...options,
|
||||
})
|
||||
}
|
||||
|
||||
export const useExportProducts = (
|
||||
query?: HttpTypes.AdminProductListParams,
|
||||
options?: UseMutationOptions<
|
||||
HttpTypes.AdminExportProductResponse,
|
||||
FetchError,
|
||||
HttpTypes.AdminExportProductRequest
|
||||
>
|
||||
) => {
|
||||
return useMutation({
|
||||
mutationFn: (payload) => sdk.admin.product.export(payload, query),
|
||||
onSuccess: (data, variables, context) => {
|
||||
options?.onSuccess?.(data, variables, context)
|
||||
},
|
||||
...options,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user