From 28ca626bac03fcf28472250ee534e2d9b309eb8d Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Thu, 16 May 2024 09:59:56 +0300 Subject: [PATCH] fix: loading is causing a glitch that changes the size of the dialog for a split second (#7062) The loading state of the FormTemplate is causing the form glitch. This fixes it by removing the loading Closes # [1-2362](https://linear.app/unleash/issue/1-2362/fix-visual-glitch-when-you-submit-the-form) https://github.com/Unleash/unleash/assets/104830839/1782ca09-a8b4-4fd1-92c1-111843869b25 Signed-off-by: andreas-unleash --- .../CreateProjectDialog/CreateProjectDialog.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx b/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx index 2b1f15fe69..45bd033ef0 100644 --- a/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx +++ b/frontend/src/component/project/Project/CreateProject/CreateProjectDialog/CreateProjectDialog.tsx @@ -1,4 +1,3 @@ -import type React from 'react'; import { formatUnknownError } from 'utils/formatUnknownError'; import useProjectApi from 'hooks/api/actions/useProjectApi/useProjectApi'; import useToast from 'hooks/useToast'; @@ -18,7 +17,7 @@ import { Button, Dialog, styled } from '@mui/material'; interface ICreateProjectDialogueProps { open: boolean; - onClose: (e: React.SyntheticEvent) => void; + onClose: () => void; } const StyledDialog = styled(Dialog)(({ theme, maxWidth }) => ({ @@ -40,7 +39,7 @@ export const CreateProjectDialogue = ({ open, onClose, }: ICreateProjectDialogueProps) => { - const { createProject, loading } = useProjectApi(); + const { createProject } = useProjectApi(); const { refetchUser } = useAuthUser(); const { uiConfig } = useUiConfig(); const { setToastData, setToastApiError } = useToast(); @@ -118,7 +117,6 @@ export const CreateProjectDialogue = ({