1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-23 09:32:29 +01:00
Pterodactyl-Panel/resources/scripts/components/elements/Translate.tsx
2022-06-11 14:52:41 -04:00

15 lines
323 B
TypeScript

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>
);
};