Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/resources/scripts/components/elements/Translate.tsx
7461 views
1
import React from 'react';
2
import { Trans, TransProps, useTranslation } from 'react-i18next';
3
4
type Props = Omit<TransProps, 't'>;
5
6
export default ({ ns, children, ...props }: Props) => {
7
const { t } = useTranslation(ns);
8
9
return (
10
<Trans t={t} {...props}>
11
{children}
12
</Trans>
13
);
14
};
15
16