@cakemail-org/ui-components-v2 2.2.63 → 2.2.64

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/cjs/index.js CHANGED
@@ -12924,18 +12924,18 @@ function GenericWrapper(_a) {
12924
12924
  }
12925
12925
  React.useEffect(function () {
12926
12926
  var _a, _b;
12927
- if (user) {
12927
+ if ((account === null || account === void 0 ? void 0 : account.id) && !userBrand) {
12928
12928
  //@ts-ignore
12929
12929
  var locale = getBestLocalMatch((_a = user === null || user === void 0 ? void 0 : user.language) === null || _a === void 0 ? void 0 : _a.replace("_", "-"), (_b = partnerBrand === null || partnerBrand === void 0 ? void 0 : partnerBrand.client_config) === null || _b === void 0 ? void 0 : _b.languages);
12930
12930
  if (LocizeInitializer) {
12931
12931
  LocizeInitializer.changeLanguage(locale);
12932
12932
  }
12933
12933
  moment$1.locale(locale);
12934
- getBrand({ id: user.id, compiled: false }).then(function (res) {
12934
+ getBrand({ id: account.id, compiled: false }).then(function (res) {
12935
12935
  setUserBrand(res);
12936
12936
  });
12937
12937
  }
12938
- }, [user]);
12938
+ }, [account]);
12939
12939
  React.useEffect(initPH, []);
12940
12940
  React.useEffect(initHandlers, [mUITheme]);
12941
12941
  function initHandlers() {
package/dist/esm/index.js CHANGED
@@ -12904,18 +12904,18 @@ function GenericWrapper(_a) {
12904
12904
  }
12905
12905
  useEffect(function () {
12906
12906
  var _a, _b;
12907
- if (user) {
12907
+ if ((account === null || account === void 0 ? void 0 : account.id) && !userBrand) {
12908
12908
  //@ts-ignore
12909
12909
  var locale = getBestLocalMatch((_a = user === null || user === void 0 ? void 0 : user.language) === null || _a === void 0 ? void 0 : _a.replace("_", "-"), (_b = partnerBrand === null || partnerBrand === void 0 ? void 0 : partnerBrand.client_config) === null || _b === void 0 ? void 0 : _b.languages);
12910
12910
  if (LocizeInitializer) {
12911
12911
  LocizeInitializer.changeLanguage(locale);
12912
12912
  }
12913
12913
  moment$1.locale(locale);
12914
- getBrand({ id: user.id, compiled: false }).then(function (res) {
12914
+ getBrand({ id: account.id, compiled: false }).then(function (res) {
12915
12915
  setUserBrand(res);
12916
12916
  });
12917
12917
  }
12918
- }, [user]);
12918
+ }, [account]);
12919
12919
  useEffect(initPH, []);
12920
12920
  useEffect(initHandlers, [mUITheme]);
12921
12921
  function initHandlers() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.2.63",
3
+ "version": "2.2.64",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",