@code-mancers/strapi-plugin-multi-site-vercel-deploy
Version:
Strapi v4 plugin to trigger and monitor deployment of multiple applications on Vercel
20 lines (16 loc) • 472 B
JavaScript
import { useIntl } from "react-intl";
import getTrad from "../utils/getTrad";
/**
* Translation Key
* @typedef {import('../types/typedefs').TranslationKey} TranslationKey
*/
/**
* Retrieve a localized label
* @param {TranslationKey} labelId Id of the label to be translated
* @returns {string}
*/
export const useFormattedMessage = (labelId) => {
const { formatMessage } = useIntl();
const label = formatMessage({ id: getTrad(labelId) });
return label;
};