File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/routes/(console)/organization-[organization] Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 21
21
let showCustomId = false ;
22
22
let disabled: boolean = false ;
23
23
let name: string = ' New project' ;
24
+ let showSubmissionLoader = false ;
24
25
25
26
async function create() {
26
27
try {
27
28
disabled = true ;
29
+ showSubmissionLoader = true ;
28
30
const project = await sdk .forConsole .projects .create (id ?? ID .unique (), name , teamId );
29
31
show = false ;
30
32
dispatch (' created' , project );
40
42
} catch (e ) {
41
43
error = e .message ;
42
44
trackError (e , Submit .ProjectCreate );
45
+ } finally {
43
46
disabled = false ;
47
+ showSubmissionLoader = false ;
44
48
}
45
49
}
46
50
</script >
62
66
63
67
<svelte:fragment slot =" footer" >
64
68
<Button secondary on:click ={() => (show = false )}>Cancel</Button >
65
- <Button submit {disabled }>Create</Button >
69
+ <Button
70
+ submit
71
+ {disabled }
72
+ forceShowLoader ={showSubmissionLoader }
73
+ submissionLoader ={showSubmissionLoader }>Create</Button >
66
74
</svelte:fragment >
67
75
</Modal >
You can’t perform that action at this time.
0 commit comments