mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-19 09:18:01 +02:00
👷♂️Add custom Trans component (#681)
This commit is contained in:
parent
91bb5b8a73
commit
ffbf920dbd
5 changed files with 40 additions and 28 deletions
8
apps/web/src/components/trans.tsx
Normal file
8
apps/web/src/components/trans.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { Trans as BaseTrans, useTranslation } from "next-i18next";
|
||||
|
||||
type TransWithContextProps = Omit<React.ComponentProps<typeof BaseTrans>, "t">;
|
||||
|
||||
export const Trans = (props: TransWithContextProps) => {
|
||||
const { t } = useTranslation();
|
||||
return <BaseTrans t={t} {...props} />;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue