mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
Migrate react-i18next translate components
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { RepositoryRole } from "@scm-manager/ui-types";
|
||||
import { translate } from "react-i18next";
|
||||
import AvailableVerbs from "./AvailableVerbs";
|
||||
|
||||
type Props = {
|
||||
type Props = WithTranslation & {
|
||||
role: RepositoryRole;
|
||||
|
||||
// context props
|
||||
t: (p: string) => string;
|
||||
};
|
||||
|
||||
class PermissionRoleDetailsTable extends React.Component<Props> {
|
||||
@@ -34,4 +31,4 @@ class PermissionRoleDetailsTable extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate("admin")(PermissionRoleDetailsTable);
|
||||
export default withTranslation("admin")(PermissionRoleDetailsTable);
|
||||
|
||||
Reference in New Issue
Block a user