From 9fc01233c65a4ef5914bc16746494bbc4b18aa94 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Thu, 16 May 2024 10:52:12 +0300 Subject: [PATCH] fix: disable the create button when api call is made (#7063) Prevends duplicate calls to api Signed-off-by: andreas-unleash --- .../CreateProject/CreateProjectDialog/CreateProjectDialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx b/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx index 45bd033ef0..b2a9d91117 100644 --- a/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx +++ b/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx @@ -39,7 +39,7 @@ export const CreateProjectDialogue = ({ open, onClose, }: ICreateProjectDialogueProps) => { - const { createProject } = useProjectApi(); + const { createProject, loading } = useProjectApi(); const { refetchUser } = useAuthUser(); const { uiConfig } = useUiConfig(); const { setToastData, setToastApiError } = useToast(); @@ -153,6 +153,7 @@ export const CreateProjectDialogue = ({