From f33090729ae770725299bb43d41423e4e43fb7e7 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Mar 2024 10:41:12 +0530 Subject: [PATCH] chore: disable the create project button explicitly to prevent accidental clicks --- .../organization-[organization]/createProject.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/console/organization-[organization]/createProject.svelte b/src/routes/console/organization-[organization]/createProject.svelte index e0f80e179..2a2bb6096 100644 --- a/src/routes/console/organization-[organization]/createProject.svelte +++ b/src/routes/console/organization-[organization]/createProject.svelte @@ -18,9 +18,11 @@ let name: string; let showCustomId = false; let error: string; + let disabled: boolean = false; async function create() { try { + disabled = true; const project = await sdk.forConsole.projects.create( id ?? ID.unique(), name, @@ -36,10 +38,12 @@ type: 'success', message: `${name} has been created` }); + show = false; await goto(`/console/project-${project.$id}`); } catch (e) { error = e.message; trackError(e, Submit.ProjectCreate); + disabled = false; } } @@ -61,6 +65,6 @@ - +