mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-19 00:15:43 +01:00
fix: disable the create button when api call is made (#7063)
Prevends duplicate calls to api Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
28ca626bac
commit
9fc01233c6
@ -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 = ({
|
||||
<CreateButton
|
||||
name='project'
|
||||
permission={CREATE_PROJECT}
|
||||
disabled={loading}
|
||||
data-testid={CREATE_PROJECT_BTN}
|
||||
/>
|
||||
</NewProjectForm>
|
||||
|
Loading…
Reference in New Issue
Block a user