Skip to content

Commit 8fc9e38

Browse files
BboyAkersdawsontoth
authored andcommitted
fix: disabling 'create' button upon creating a new application
1 parent 4aff6b0 commit 8fc9e38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/features/instance/applications/new/CreateNewApplicationForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function CreateNewApplicationForm({
4242
},
4343
});
4444

45-
const { mutate: createNewApplication } = useCreateComponentMutation();
45+
const { mutate: createNewApplication, isPending: isCreateNewApplicationPending } = useCreateComponentMutation();
4646
const submitForm = (formData: CreateComponentFormData) => {
4747
createNewApplication({ ...formData, ...instanceParams }, {
4848
onSuccess: () => {
@@ -72,7 +72,7 @@ export function CreateNewApplicationForm({
7272
className="w-full"
7373
variant="submit"
7474
type="submit"
75-
disabled={!form.formState.isDirty || isRestartPending}
75+
disabled={!form.formState.isDirty || isCreateNewApplicationPending || isRestartPending}
7676
>
7777
Create <ArrowRight />
7878
</Button>

0 commit comments

Comments
 (0)