@bigbinary/neeto-templates-frontend 1.1.17 → 1.1.18

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/dist/index.js CHANGED
@@ -2717,7 +2717,8 @@ var List = function List(_ref) {
2717
2717
  hasNextPage = _useFetchTemplates$ha === void 0 ? false : _useFetchTemplates$ha,
2718
2718
  fetchNextPage = _useFetchTemplates.fetchNextPage,
2719
2719
  isTemplatesLoading = _useFetchTemplates.isLoading,
2720
- data = _useFetchTemplates.data;
2720
+ _useFetchTemplates$da = _useFetchTemplates.data,
2721
+ data = _useFetchTemplates$da === void 0 ? {} : _useFetchTemplates$da;
2721
2722
  var _useInfiniteScroll = useInfiniteScroll({
2722
2723
  loading: isTemplatesLoading,
2723
2724
  hasNextPage: hasNextPage,
@@ -2735,9 +2736,12 @@ var List = function List(_ref) {
2735
2736
  if (isTemplatesLoading) {
2736
2737
  return /*#__PURE__*/React__default.createElement(PageLoader, null);
2737
2738
  }
2738
- var tags = data.tags,
2739
- templates = data.templates,
2740
- templatesCount = data.templatesCount;
2739
+ var _data$tags = data.tags,
2740
+ tags = _data$tags === void 0 ? [] : _data$tags,
2741
+ _data$templates = data.templates,
2742
+ templates = _data$templates === void 0 ? [] : _data$templates,
2743
+ _data$templatesCount = data.templatesCount,
2744
+ templatesCount = _data$templatesCount === void 0 ? 0 : _data$templatesCount;
2741
2745
  var categories = [_objectSpread$2(_objectSpread$2({}, DEFAULT_CATEGORY), {}, {
2742
2746
  count: templatesCount
2743
2747
  })].concat(_toConsumableArray(tags));
@@ -2800,7 +2804,7 @@ var List = function List(_ref) {
2800
2804
  icon: isCreating ? Spinner : SvgCustom,
2801
2805
  title: t("neetoTemplate.templates.blankCard.title"),
2802
2806
  onClick: onCreate
2803
- }), templates === null || templates === void 0 ? void 0 : templates.map(function (template, index) {
2807
+ }), templates.map(function (template, index) {
2804
2808
  return /*#__PURE__*/React__default.createElement(Card, {
2805
2809
  key: index,
2806
2810
  template: template,