@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
24 lines (17 loc) • 653 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _useDictionary = _interopRequireDefault(require("./useDictionary"));
var _Translate = require("../Translate");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var useTranslate = function useTranslate() {
var dictionary = (0, _useDictionary.default)();
return (0, _react.useCallback)(function (key, values) {
return (0, _Translate.pureTranslate)(dictionary, key, values);
}, [dictionary]);
};
var _default = useTranslate;
exports.default = _default;