akeyless-client-commons 1.1.109 → 1.1.111

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.
@@ -3,7 +3,7 @@ import { Dispatch, SetStateAction, EffectCallback } from 'react';
3
3
  import { WhereFilterOp } from 'firebase/firestore';
4
4
 
5
5
  declare const useDocumentTitle: (title: string) => any;
6
- declare const useSetUserCountry: (setUserCountry: Dispatch<SetStateAction<CountryOptions>>, changLang: (lang: string) => void) => any;
6
+ declare const useSetUserCountry: (setUserCountry: Dispatch<SetStateAction<CountryOptions>>, changLang?: (lang: string) => void) => any;
7
7
 
8
8
  declare function useSafeEffect(callback: () => void, dependencies: any[], error_message?: string): void;
9
9
  declare const useDeepCompareMemo: <T>(factory: () => T, dependencies: any[]) => T;
@@ -3,7 +3,7 @@ import { Dispatch, SetStateAction, EffectCallback } from 'react';
3
3
  import { WhereFilterOp } from 'firebase/firestore';
4
4
 
5
5
  declare const useDocumentTitle: (title: string) => any;
6
- declare const useSetUserCountry: (setUserCountry: Dispatch<SetStateAction<CountryOptions>>, changLang: (lang: string) => void) => any;
6
+ declare const useSetUserCountry: (setUserCountry: Dispatch<SetStateAction<CountryOptions>>, changLang?: (lang: string) => void) => any;
7
7
 
8
8
  declare function useSafeEffect(callback: () => void, dependencies: any[], error_message?: string): void;
9
9
  declare const useDeepCompareMemo: <T>(factory: () => T, dependencies: any[]) => T;
@@ -1130,6 +1130,7 @@ var useDocumentTitle = function(title) {
1130
1130
  };
1131
1131
  var useSetUserCountry = function(setUserCountry, changLang) {
1132
1132
  (0, import_react2.useLayoutEffect)(function() {
1133
+ var currentCountry = localStorage.getItem("userCountry");
1133
1134
  var updateCountry = /*#__PURE__*/ function() {
1134
1135
  var _ref = _async_to_generator(function() {
1135
1136
  var country;
@@ -1142,7 +1143,7 @@ var useSetUserCountry = function(setUserCountry, changLang) {
1142
1143
  ];
1143
1144
  case 1:
1144
1145
  country = _state.sent();
1145
- changLang(country === import_akeyless_types_commons2.CountryOptions.IL ? "he" : "en");
1146
+ changLang === null || changLang === void 0 ? void 0 : changLang(country === import_akeyless_types_commons2.CountryOptions.IL ? "he" : "en");
1146
1147
  setUserCountry(country);
1147
1148
  localStorage.setItem("userCountry", country);
1148
1149
  return [
@@ -1034,6 +1034,7 @@ var useDocumentTitle = function(title) {
1034
1034
  };
1035
1035
  var useSetUserCountry = function(setUserCountry, changLang) {
1036
1036
  useLayoutEffect(function() {
1037
+ var currentCountry = localStorage.getItem("userCountry");
1037
1038
  var updateCountry = /*#__PURE__*/ function() {
1038
1039
  var _ref = _async_to_generator(function() {
1039
1040
  var country;
@@ -1046,7 +1047,7 @@ var useSetUserCountry = function(setUserCountry, changLang) {
1046
1047
  ];
1047
1048
  case 1:
1048
1049
  country = _state.sent();
1049
- changLang(country === CountryOptions2.IL ? "he" : "en");
1050
+ changLang === null || changLang === void 0 ? void 0 : changLang(country === CountryOptions2.IL ? "he" : "en");
1050
1051
  setUserCountry(country);
1051
1052
  localStorage.setItem("userCountry", country);
1052
1053
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akeyless-client-commons",
3
- "version": "1.1.109",
3
+ "version": "1.1.111",
4
4
  "scripts": {
5
5
  "build": "tsup",
6
6
  "deploy": "npm run build && npm version patch --no-git-tag-version && npm publish",