fix review findings

This commit is contained in:
Konstantin Schaper
2020-10-06 13:45:17 +02:00
parent fcbdb6c2f7
commit 330e974cac
6 changed files with 41 additions and 63 deletions

View File

@@ -22,11 +22,11 @@
* SOFTWARE.
*/
import React, { FC, useState } from "react";
import { WithTranslation, withTranslation } from "react-i18next";
import { useTranslation } from "react-i18next";
import { Permission } from "@scm-manager/ui-types";
import { ConfirmAlert } from "@scm-manager/ui-components";
type Props = WithTranslation & {
type Props = {
permission: Permission;
namespace: string;
repoName: string;
@@ -39,11 +39,11 @@ const DeletePermissionButton: FC<Props> = ({
confirmDialog = true,
permission,
namespace,
t,
deletePermission,
repoName
}) => {
const [showConfirmAlert, setShowConfirmAlert] = useState(false);
const [t] = useTranslation("repos");
const deletePermissionCallback = () => {
deletePermission(permission, namespace, repoName);
@@ -93,4 +93,4 @@ const DeletePermissionButton: FC<Props> = ({
);
};
export default withTranslation("repos")(DeletePermissionButton);
export default DeletePermissionButton;