import { useTranslations } from "next-intl"; export function Translated({ i18nKey, namespace, data, ...props }: { i18nKey: string; children?: React.ReactNode; namespace?: string; data?: any; } & React.HTMLAttributes) { const t = useTranslations(namespace); const helperKey = `${namespace ? `${namespace}.` : ""}${i18nKey}`; return ( {t(i18nKey, data)} ); }