Skip to content

Commit 89881f1

Browse files
authored
Merge pull request #1996 from appwrite/fix-PRO-1884
fix: project creation error
2 parents 5051d1b + 822b2fe commit 89881f1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
let id: string = null;
2020
let name: string = 'Appwrite project';
2121
let region: string = Region.Fra;
22+
let error: string = null;
2223
2324
async function onFinish() {
2425
await invalidate(Dependencies.FUNCTIONS);
@@ -45,22 +46,20 @@
4546
await onFinish();
4647
await goto(`${base}/project-${project.region}-${project.$id}`);
4748
} catch (e) {
48-
addNotification({
49-
type: 'error',
50-
message: e.message
51-
});
5249
trackError(e, Submit.ProjectCreate);
50+
error = e.message;
5351
}
5452
}
5553
5654
onDestroy(() => {
5755
id = null;
5856
name = null;
5957
region = 'fra';
58+
error = null;
6059
});
6160
</script>
6261

63-
<Modal bind:show={showCreateProjectCloud} title={'Create project'} onSubmit={create}>
62+
<Modal bind:show={showCreateProjectCloud} title={'Create project'} onSubmit={create} bind:error>
6463
<CreateProject showTitle={false} bind:id bind:projectName={name} bind:region {regions}>
6564
</CreateProject>
6665
<svelte:fragment slot="footer">

0 commit comments

Comments
 (0)