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,
|
open,
|
||||||
onClose,
|
onClose,
|
||||||
}: ICreateProjectDialogueProps) => {
|
}: ICreateProjectDialogueProps) => {
|
||||||
const { createProject } = useProjectApi();
|
const { createProject, loading } = useProjectApi();
|
||||||
const { refetchUser } = useAuthUser();
|
const { refetchUser } = useAuthUser();
|
||||||
const { uiConfig } = useUiConfig();
|
const { uiConfig } = useUiConfig();
|
||||||
const { setToastData, setToastApiError } = useToast();
|
const { setToastData, setToastApiError } = useToast();
|
||||||
@ -153,6 +153,7 @@ export const CreateProjectDialogue = ({
|
|||||||
<CreateButton
|
<CreateButton
|
||||||
name='project'
|
name='project'
|
||||||
permission={CREATE_PROJECT}
|
permission={CREATE_PROJECT}
|
||||||
|
disabled={loading}
|
||||||
data-testid={CREATE_PROJECT_BTN}
|
data-testid={CREATE_PROJECT_BTN}
|
||||||
/>
|
/>
|
||||||
</NewProjectForm>
|
</NewProjectForm>
|
||||||
|
Loading…
Reference in New Issue
Block a user