diff --git a/frontend/src/resources/deployment/actions.tsx b/frontend/src/resources/deployment/actions.tsx index 66d4f981c..6b8786a26 100644 --- a/frontend/src/resources/deployment/actions.tsx +++ b/frontend/src/resources/deployment/actions.tsx @@ -1,16 +1,15 @@ -import { ActionWithDialog, ConfirmButton } from "@components/util"; -import { Play, Trash, Pause, Rocket } from "lucide-react"; -import { useExecute, useRead, useWrite } from "@hooks"; +import { + ActionButton, + ActionWithDialog, + ConfirmButton, +} from "@components/util"; +import { Play, Trash, Pause, Rocket, Pen } from "lucide-react"; +import { useExecute, useInvalidate, useRead, useWrite } from "@hooks"; import { DockerContainerState } from "@monitor/client/dist/types"; import { useNavigate } from "react-router-dom"; import { Input } from "@ui/input"; -import { useState } from "react"; -import { useQueryClient } from "@tanstack/react-query"; import { useToast } from "@ui/toast/use-toast"; -import { Input } from "@ui/input"; import { useState } from "react"; -import { useQueryClient } from "@tanstack/react-query"; -import { useToast } from "@ui/toast/use-toast"; interface DeploymentId { deployment_id: string; @@ -140,55 +139,6 @@ export const DeleteDeployment = ({ id }: { id: string }) => { ); }; -export const RenameDeployment = ({ id }: { id: string }) => { - const invalidate = useInvalidate(); - - const { toast } = useToast(); - const { mutate, isLoading } = useWrite("RenameDeployment", { - onSuccess: () => { - invalidate(["ListDeployments"]); - toast({ title: "Deployment Renamed" }); - set(""); - }, - }); - - const [name, set] = useState(""); - - return ( -