@evlop/commons 1.0.201 → 1.0.202

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,eAAO,MAAM,cAAc,iBAM1B,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKpC,eAAO,MAAM,cAAc,iBAO1B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.useTranslation = void 0;
7
7
  const react_1 = require("react");
8
8
  const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
9
+ const useScope_1 = require("./useScope");
9
10
  const useTranslation = () => {
11
+ const i18n = useScope_1.useScope('i18n');
10
12
  const translate = react_1.useCallback((key, options) => {
11
13
  return i18ninstance_1.default.t(key, options);
12
- }, []);
14
+ }, [i18n]);
13
15
  return translate;
14
16
  };
15
17
  exports.useTranslation = useTranslation;
@@ -1 +1 @@
1
- {"version":3,"file":"useTranslation.js","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":";;;;;;AACA,iCAAoC;AACpC,6EAAqD;AAE9C,MAAM,cAAc,GAAG,GAAE,EAAE;IAC9B,MAAM,SAAS,GAAc,mBAAW,CAAC,CAAC,GAAQ,EAAE,OAAa,EAAC,EAAE;QAChE,OAAO,sBAAY,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACvC,CAAC,EAAG,EAAE,CAAC,CAAA;IAEP,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AANW,QAAA,cAAc,kBAMzB;AAEF,kBAAe,sBAAc,CAAC"}
1
+ {"version":3,"file":"useTranslation.js","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":";;;;;;AACA,iCAAoC;AACpC,6EAAqD;AACrD,yCAAsC;AAE/B,MAAM,cAAc,GAAG,GAAE,EAAE;IAC9B,MAAM,IAAI,GAAG,mBAAQ,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAc,mBAAW,CAAC,CAAC,GAAQ,EAAE,OAAa,EAAC,EAAE;QAChE,OAAO,sBAAY,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACvC,CAAC,EAAG,CAAC,IAAI,CAAC,CAAC,CAAA;IAEX,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB;AAEF,kBAAe,sBAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.201",
3
+ "version": "1.0.202",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {