@bigbinary/neeto-themes-frontend 3.1.1 → 3.1.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.
@@ -1212,11 +1212,13 @@ var Customize = function Customize(_ref) {
1212
1212
  var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
1213
1213
  return {
1214
1214
  themePropertiesSchema: store["themePropertiesSchema"],
1215
- entityType: store["entityType"]
1215
+ entityType: store["entityType"],
1216
+ isFetchingSchema: store["isFetchingSchema"]
1216
1217
  };
1217
1218
  }, shallow.shallow),
1218
1219
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
1219
- entityType = _useConfigStore.entityType;
1220
+ entityType = _useConfigStore.entityType,
1221
+ isFetchingSchema = _useConfigStore.isFetchingSchema;
1220
1222
  var _useParams = reactRouterDom.useParams(),
1221
1223
  themeId = _useParams.themeId;
1222
1224
  var _useThemeStore = useThemeUtils.useThemeStore(function (store) {
@@ -1238,7 +1240,8 @@ var Customize = function Customize(_ref) {
1238
1240
  }),
1239
1241
  _useFetchTheme$data = _useFetchTheme.data,
1240
1242
  themeData = _useFetchTheme$data === void 0 ? {} : _useFetchTheme$data,
1241
- isLoading = _useFetchTheme.isLoading;
1243
+ isLoadingTheme = _useFetchTheme.isLoadingTheme;
1244
+ var isLoading = isFetchingSchema || isLoadingTheme;
1242
1245
  var isThemeGlobalTheme = themeId && (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id) === themeId;
1243
1246
  var isCurrentThemeAndGlobalThemeSame = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id);
1244
1247
  var isEditingCurrentlyAppliedTheme = themeId === (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id);
@@ -1288,12 +1291,12 @@ var Customize = function Customize(_ref) {
1288
1291
  });
1289
1292
  };
1290
1293
  react.useEffect(function () {
1291
- if (ramda.isNotNil(themeId) && !isLoading) {
1294
+ if (ramda.isNotNil(themeId) && !isLoadingTheme) {
1292
1295
  setThemeState({
1293
1296
  previewingTheme: themeData
1294
1297
  });
1295
1298
  }
1296
- }, [themeData, isLoading]);
1299
+ }, [isLoadingTheme]);
1297
1300
  if (isLoading) {
1298
1301
  return /*#__PURE__*/jsxRuntime.jsx(PageLoader, {});
1299
1302
  }