From 12e16b4a03072094424909d855a663789bb55d5c Mon Sep 17 00:00:00 2001 From: Sheen Date: Sat, 15 Apr 2023 11:21:35 +0800 Subject: [PATCH] [Adjustment][Sheen] removed additional prompt when deleting secret --- .../components/dashboard/DeleteActionButton.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/dashboard/DeleteActionButton.tsx b/frontend/src/components/dashboard/DeleteActionButton.tsx index 91819b43c..48b81eaee 100644 --- a/frontend/src/components/dashboard/DeleteActionButton.tsx +++ b/frontend/src/components/dashboard/DeleteActionButton.tsx @@ -1,10 +1,9 @@ -import React, { useState } from 'react' +import React from 'react' import { useTranslation } from 'react-i18next'; import { faXmark } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import Button from '../basic/buttons/Button'; -import { DeleteEnvVar } from '../basic/dialog/DeleteEnvVar'; type Props = { onSubmit: () => void; @@ -13,7 +12,6 @@ type Props = { export const DeleteActionButton = ({ onSubmit, isPlain }: Props) => { const { t } = useTranslation(); - const [open, setOpen] = useState(false) return (
{ onKeyDown={() => null} role="button" tabIndex={0} - onClick={() => setOpen(true)} + onClick={onSubmit} className="invisible group-hover:visible" >
: