rallly/apps/web/src/components/trans.tsx
2025-02-26 14:22:02 +00:00

15 lines
471 B
TypeScript

"use client";
import { Trans as BaseTrans, useTranslation } from "react-i18next";
import type { TxKeyPath } from "../i18n/types";
export const Trans = (props: {
i18nKey: TxKeyPath;
defaults?: string;
values?: Record<string, string | number | boolean | undefined>;
children?: React.ReactNode;
components?: Record<string, React.ReactElement> | React.ReactElement[];
}) => {
const { t } = useTranslation();
return <BaseTrans ns="app" t={t} {...props} />;
};