@capillarytech/creatives-library 7.17.112 → 7.17.113

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": "7.17.112",
4
+ "version": "7.17.113",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -358,9 +358,14 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
358
358
  name: this.state.searchText,
359
359
  sortBy: this.state.sortBy,
360
360
  };
361
- const { totalCount: nextPropsTotalTemplatesCount } = nextProps?.TemplatesList?.[0] || {};
362
361
  const { totalCount: propsTotalTemplatesCount } = this.props?.TemplatesList?.[0] || {};
362
+ let nextPropsTotalTemplatesCount;
363
+ if(get(nextProps,'route.name').toLowerCase() === ZALO_LOWERCASE){
363
364
 
365
+ nextPropsTotalTemplatesCount = (nextProps?.TemplatesList|| [])?.length;
366
+ } else {
367
+ nextPropsTotalTemplatesCount = (nextProps?.TemplatesList?.[0] || {})?.totalCount;
368
+ }
364
369
  if (nextPropsTotalTemplatesCount && nextPropsTotalTemplatesCount !== propsTotalTemplatesCount) {
365
370
  this.setState({ templatesCount: nextPropsTotalTemplatesCount });
366
371
  }