优化
This commit is contained in:
8
client/shared/i18n/Trans.tsx
Normal file
8
client/shared/i18n/Trans.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Trans as OriginalTrans, TransProps } from 'react-i18next';
|
||||
|
||||
type Props = Omit<TransProps<string>, 't'>;
|
||||
export const Trans: React.FC<Props> = React.memo((props) => {
|
||||
return <OriginalTrans>{props.children}</OriginalTrans>;
|
||||
});
|
||||
Trans.displayName = 'Trans';
|
||||
Reference in New Issue
Block a user