From a4205a8662eaafe6396ddf1900efa9b9ad9564c2 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Thu, 7 Mar 2024 02:22:52 +0100 Subject: [PATCH] =?UTF-8?q?Cleanup=20=F0=9F=A7=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectNameChangeSection.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx index f952e12fa..34261f47a 100644 --- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectNameChangeSection/ProjectNameChangeSection.tsx @@ -7,7 +7,6 @@ import { useNotificationContext } from "@app/components/context/Notifications/No import { ProjectPermissionCan } from "@app/components/permissions"; import { Button, FormControl, Input } from "@app/components/v2"; import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context"; -import { useToggle } from "@app/hooks"; import { useRenameWorkspace } from "@app/hooks/api"; import { CopyButton } from "./CopyButton"; @@ -22,7 +21,6 @@ export const ProjectNameChangeSection = () => { const { createNotification } = useNotificationContext(); const { currentWorkspace } = useWorkspace(); const { mutateAsync, isLoading } = useRenameWorkspace(); - const [isProjectIdCopied, setIsProjectIdCopied] = useToggle(false); const { handleSubmit, control, reset } = useForm({ resolver: yupResolver(formSchema) }); @@ -34,16 +32,6 @@ export const ProjectNameChangeSection = () => { } }, [currentWorkspace]); - useEffect(() => { - let timer: NodeJS.Timeout; - - if (isProjectIdCopied) { - timer = setTimeout(() => setIsProjectIdCopied.off(), 2000); - } - - return () => clearTimeout(timer); - }, [setIsProjectIdCopied]); - const onFormSubmit = async ({ name }: FormData) => { try { if (!currentWorkspace?.id) return;