mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Migrate react-i18next translate components
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Permission } from "@scm-manager/ui-types";
|
||||
import { confirmAlert } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
type Props = WithTranslation & {
|
||||
permission: Permission;
|
||||
namespace: string;
|
||||
repoName: string;
|
||||
confirmDialog?: boolean;
|
||||
t: (p: string) => string;
|
||||
deletePermission: (permission: Permission, namespace: string, repoName: string) => void;
|
||||
loading: boolean;
|
||||
};
|
||||
@@ -61,4 +60,4 @@ class DeletePermissionButton extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate("repos")(DeletePermissionButton);
|
||||
export default withTranslation("repos")(DeletePermissionButton);
|
||||
|
||||
Reference in New Issue
Block a user