@capillarytech/creatives-library 6.12.1 → 6.12.2

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": "6.12.1",
4
+ "version": "6.12.2",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -217,8 +217,8 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
217
217
  return this.props.Templates.loadingTemplates;
218
218
  }
219
219
  render() {
220
- const { isFullMode, className, cap = {}} = this.props;
221
- const { accessiblePermissions = []} = cap.user || {};
220
+ const { isFullMode, className, cap = {}, authData = {}} = this.props;
221
+ const { accessiblePermissions = []} = cap.user || authData.user || {};
222
222
  let isCreativeAccessible = true;
223
223
  if (!accessiblePermissions.includes(CREATIVES_UI_VIEW)) {
224
224
  isCreativeAccessible = false;
@@ -266,6 +266,7 @@ TemplatesV2.propTypes = {
266
266
  onFacebookSubmit: PropTypes.func,
267
267
  messageDetails: PropTypes.object,
268
268
  cap: PropTypes.object,
269
+ authData: PropTypes.object,
269
270
  };
270
271
 
271
272
  TemplatesV2.defaultProps = {