portainer/app/__mocks__/react-i18next.tsx

17 lines
312 B
TypeScript

import { PropsWithChildren } from 'react';
import { mockT } from './i18next';
export function useTranslation() {
return {
t: mockT,
i18n: {
changeLanguage: () => new Promise(() => {}),
},
};
}
export function Trans({ children }: PropsWithChildren<unknown>) {
return <>{children}</>;
}