mirror of
				https://github.com/scm-manager/scm-manager.git
				synced 2025-10-30 18:15:52 +01:00 
			
		
		
		
	Migrate react-i18next translate components
This commit is contained in:
		| @@ -2,14 +2,11 @@ import React from "react"; | ||||
| import { Changeset, Link } from "@scm-manager/ui-types"; | ||||
| import LoadingDiff from "../LoadingDiff"; | ||||
| import Notification from "../../Notification"; | ||||
| import { translate } from "react-i18next"; | ||||
| import { WithTranslation, withTranslation } from "react-i18next"; | ||||
|  | ||||
| type Props = { | ||||
| type Props = WithTranslation & { | ||||
|   changeset: Changeset; | ||||
|   defaultCollapse?: boolean; | ||||
|  | ||||
|   // context props | ||||
|   t: (p: string) => string; | ||||
| }; | ||||
|  | ||||
| class ChangesetDiff extends React.Component<Props> { | ||||
| @@ -36,4 +33,4 @@ class ChangesetDiff extends React.Component<Props> { | ||||
|   } | ||||
| } | ||||
|  | ||||
| export default translate("repos")(ChangesetDiff); | ||||
| export default withTranslation("repos")(ChangesetDiff); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user