mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
Migrate react-i18next translate components
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
import * as React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
import { InfoItem } from "./InfoItem";
|
||||
import { Icon } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
type Props = WithTranslation & {
|
||||
type: "plugin" | "feature";
|
||||
item: InfoItem;
|
||||
|
||||
// context props
|
||||
t: (p: string) => string;
|
||||
};
|
||||
|
||||
const BottomMarginA = styled.a`
|
||||
@@ -73,4 +70,4 @@ class InfoBox extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate("commons")(InfoBox);
|
||||
export default withTranslation("commons")(InfoBox);
|
||||
|
||||
Reference in New Issue
Block a user