UNPKG

react-intlayer

Version:

Easily internationalize i18n your React applications with type-safe multilingual content management.

14 lines 423 B
import { compact } from "@intlayer/core"; import { IntlayerServerContext } from "../IntlayerServerProvider.mjs"; import { getServerContext } from "../serverContext.mjs"; const useCompact = () => { const locale = getServerContext(IntlayerServerContext); return (...args) => compact(args[0], { ...args[1], locale: args[1]?.locale ?? locale }); }; export { useCompact }; //# sourceMappingURL=useCompact.mjs.map