@bindu-dashing/dam-solution-v2 5.8.84 → 5.8.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,12 +54,12 @@ function TestImagePickerModal({ imagePicker, open, toggleModal, setSelectedFile,
54
54
  console.log("Shopify product detail response:", response.data);
55
55
  // Get product data from response
56
56
  const productData = get(response, "data.data", get(response, "data", {}));
57
- // Get image URL from image.src
58
- const thumbnailUrl = get(productData, "image.src", get(productData, "images[0].src", fileForConfirmation === null || fileForConfirmation === void 0 ? void 0 : fileForConfirmation.thumbnailUrl));
57
+ // Get image URL from image.src (image is an object with src property)
58
+ const thumbnailUrl = get(productData, "image.src", get(productData, "images.0.src", fileForConfirmation === null || fileForConfirmation === void 0 ? void 0 : fileForConfirmation.thumbnailUrl));
59
59
  // Extract title, vendor, and price
60
60
  const title = get(productData, "title", "");
61
61
  const vendor = get(productData, "vendor", "");
62
- const price = get(productData, "variants[0].price", "");
62
+ const price = get(productData, "variants.0.price", "");
63
63
  // Pass structured product data as JSON string
64
64
  const productInfo = {
65
65
  title,
@@ -276,13 +276,15 @@ function DriveContainer({ parentFolderId, setSelectedFile, setParentFolderId, pi
276
276
  console.log("Extracted products:", products);
277
277
  const transformedProducts = (Array.isArray(products) ? products : []).map((product) => {
278
278
  // Get price from first variant
279
- const price = get(product, "variants[0].price", "");
279
+ const price = get(product, "variants.0.price", "");
280
280
  const formattedPrice = price ? `$${price}` : "";
281
+ // Get image URL from image.src (image is an object with src property)
282
+ const imageUrl = get(product, "image.src", get(product, "images.0.src", ""));
281
283
  return {
282
284
  _id: product.id || product._id || `shopify-${Date.now()}-${Math.random()}`,
283
285
  name: product.title || product.name || "Unknown Product",
284
- thumbnailUrl: product.image || product.thumbnailUrl || "",
285
- s3Url: product.image || product.s3Url || "",
286
+ thumbnailUrl: imageUrl || product.thumbnailUrl || "",
287
+ s3Url: imageUrl || product.s3Url || "",
286
288
  type: EntityType.FILE,
287
289
  fileType: "jpeg",
288
290
  createdAt: product.created_at || product.createdAt || new Date().toISOString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.84",
3
+ "version": "5.8.85",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",