misc_pterodactyl-panel/resources/scripts/components/elements/Translate.tsx

15 lines
323 B
TypeScript
Raw Permalink Normal View History

import React from 'react';
import { Trans, TransProps, useTranslation } from 'react-i18next';
type Props = Omit<TransProps, 't'>;
export default ({ ns, children, ...props }: Props) => {
const { t } = useTranslation(ns);
return (
<Trans t={t} {...props}>
{children}
</Trans>
);
};