withTranslation is a higher-order component. It’s used to wrap the components you want to translate.
withTranslation
const withTranslations: <L extends LanguageCode, K extends object>( translationProps: CreateTranslationReturn<L, K>,) => (Component: FC<CreateTranslationReturn<L, K>>) => JSX.Element;