@@ -197,7 +197,7 @@ export function CreateProject() {
197
197
const api = useApi ( ) ;
198
198
const navigate = useNavigate ( ) ;
199
199
const [ errors , setErrors ] = useState ( ) ;
200
- const [ loading , setLoading ] = useState ( false ) ;
200
+ const [ submitting , setSubmitting ] = useState ( false ) ;
201
201
const organization = useOrganization ( ) ;
202
202
const location = useLocation ( ) ;
203
203
const { createNotificationAction, notificationProps} = useCreateNotificationAction ( ) ;
@@ -299,7 +299,10 @@ export function CreateProject() {
299
299
] . filter ( value => value ) . length ;
300
300
301
301
const canSubmitForm =
302
- ! loading && ! createProject . isPending && canUserCreateProject && formErrorCount === 0 ;
302
+ ! submitting &&
303
+ ! createProject . isPending &&
304
+ canUserCreateProject &&
305
+ formErrorCount === 0 ;
303
306
304
307
const submitTooltipText = getSubmitTooltipText ( {
305
308
...missingValues ,
@@ -349,7 +352,7 @@ export function CreateProject() {
349
352
let notificationRuleId : string | undefined = undefined ;
350
353
351
354
try {
352
- setLoading ( true ) ;
355
+ setSubmitting ( true ) ;
353
356
project = await createProject . mutateAsync ( {
354
357
name : projectName ,
355
358
platform : selectedPlatform ,
@@ -427,7 +430,7 @@ export function CreateProject() {
427
430
notificationRuleId,
428
431
} ) ;
429
432
} finally {
430
- setLoading ( false ) ;
433
+ setSubmitting ( false ) ;
431
434
}
432
435
} ,
433
436
[ organization , createProject , setCreatedProject , navigate , api , createRules ]
0 commit comments