mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
Migrate react-i18next translate components
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import React, { ReactNode } from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import PrimaryNavigationLink from "./PrimaryNavigationLink";
|
||||
import { Links } from "@scm-manager/ui-types";
|
||||
import { binder, ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
|
||||
type Props = {
|
||||
t: (p: string) => string;
|
||||
type Props = WithTranslation & {
|
||||
links: Links;
|
||||
};
|
||||
|
||||
@@ -88,4 +87,4 @@ class PrimaryNavigation extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate("commons")(PrimaryNavigation);
|
||||
export default withTranslation("commons")(PrimaryNavigation);
|
||||
|
||||
Reference in New Issue
Block a user