Skip to content

Commit 18e8517

Browse files
authored
Merge pull request #2107 from HarshMN2345/fix-PRO-1966-Only-cloud-project-creation-has-a-spinner-on-Modal
2 parents 73c0d91 + f5da254 commit 18e8517

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/routes/(console)/organization-[organization]/createProject.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
let showCustomId = false;
2222
let disabled: boolean = false;
2323
let name: string = 'New project';
24+
let showSubmissionLoader = false;
2425
2526
async function create() {
2627
try {
2728
disabled = true;
29+
showSubmissionLoader = true;
2830
const project = await sdk.forConsole.projects.create(id ?? ID.unique(), name, teamId);
2931
show = false;
3032
dispatch('created', project);
@@ -40,7 +42,9 @@
4042
} catch (e) {
4143
error = e.message;
4244
trackError(e, Submit.ProjectCreate);
45+
} finally {
4346
disabled = false;
47+
showSubmissionLoader = false;
4448
}
4549
}
4650
</script>
@@ -62,6 +66,10 @@
6266

6367
<svelte:fragment slot="footer">
6468
<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>
6674
</svelte:fragment>
6775
</Modal>

0 commit comments

Comments
 (0)