@evlop/commons 1.0.201 → 1.0.202
Sign up to get free protection for your applications and to get access to all the features.
@@ -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;
|
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;
|
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"}
|