@bindu-dashing/dam-solution-v2 5.8.69 → 5.8.71

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.
@@ -238,17 +238,23 @@ function DriveContainer({ parentFolderId, setSelectedFile, setParentFolderId, pi
238
238
  }, [brandId]);
239
239
  // Fetch Shopify products when in shopify search mode
240
240
  useEffect(() => {
241
- if (shopifySearchMode && coreApiUrl && coreApiToken && folderSearch && folderSearch.length >= 2) {
241
+ console.log("Shopify search effect - shopifySearchMode:", shopifySearchMode, "coreApiToken:", !!coreApiToken, "folderSearch:", folderSearch);
242
+ // Only require coreApiToken (not coreApiUrl since we have a fallback)
243
+ if (shopifySearchMode && coreApiToken && folderSearch && folderSearch.length >= 2) {
242
244
  fetchShopifyProducts(folderSearch);
243
245
  }
244
246
  else if (shopifySearchMode && (!folderSearch || folderSearch.length < 2)) {
245
247
  setState((prevState) => (Object.assign(Object.assign({}, prevState), { shopifyProducts: [] })));
246
248
  }
247
- }, [shopifySearchMode, coreApiUrl, coreApiToken, folderSearch]);
249
+ }, [shopifySearchMode, coreApiToken, folderSearch]);
248
250
  const fetchShopifyProducts = (searchTerm) => __awaiter(this, void 0, void 0, function* () {
249
251
  setState((prevState) => (Object.assign(Object.assign({}, prevState), { shopifyLoading: true })));
250
252
  try {
251
- const response = yield axios.get(`${coreApiUrl}${FETCH_SHOPIFY_PRODUCTS_URL}`, {
253
+ // Use coreApiUrl if provided, otherwise use staging URL as fallback
254
+ const shopifyApiBaseUrl = coreApiUrl || "https://staging-api.dashingone.com.au";
255
+ console.log("Shopify API Base URL:", shopifyApiBaseUrl);
256
+ console.log("Core API Token available:", !!coreApiToken);
257
+ const response = yield axios.get(`${shopifyApiBaseUrl}${FETCH_SHOPIFY_PRODUCTS_URL}`, {
252
258
  params: { title: searchTerm },
253
259
  headers: {
254
260
  Authorization: `Bearer ${coreApiToken}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.69",
3
+ "version": "5.8.71",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",