@capillarytech/creatives-library 8.0.184-beta.0 → 8.0.184

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.184-beta.0",
4
+ "version": "8.0.184",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -226,15 +226,13 @@ export function* watchGetCdnTransformationConfig() {
226
226
  );
227
227
  }
228
228
 
229
- // Zalo template info watcher - only for preview functionality from Templates component
229
+ // Zalo template info watcher - only for preview if previewUrl is empty from Templates component
230
230
  export function* watchForGetTemplateInfoById() {
231
231
  yield takeLatest(ZALO_TEMPLATE_INFO_REQUEST, function* handleZaloTemplateInfoRequest(action) {
232
- // Only handle requests that are specifically for preview (have preview flag)
233
- // Ignore edit requests (handled by Zalo component saga)
234
- if (action.payload && action.payload.preview && !action.payload.edit) {
232
+ // Ignore edit requests (Already handled by Zalo component saga)
233
+ if (!action?.payload?.edit) {
235
234
  yield call(getTemplateInfoById, action);
236
235
  }
237
- // If it's not a preview request or is an edit request, let the Zalo component handle it
238
236
  });
239
237
  }
240
238
 
@@ -134,11 +134,8 @@ export const Zalo = (props) => {
134
134
 
135
135
  //gets template details - prevent duplicate calls with Templates saga
136
136
  useEffect(() => {
137
- const hasRequiredData = zaloTempId && oa_id && token && username && hostName;
138
-
139
- // Only make API call if we have all required data
140
137
  // Add edit flag to distinguish from preview requests handled by Templates saga
141
- if (hasRequiredData) {
138
+ if (zaloTempId && oa_id && token && username && hostName) {
142
139
  actions.getTemplateInfoById({
143
140
  username,
144
141
  oa_id,