Skip to content

Commit cd29f5d

Browse files
committed
disable button
1 parent b527bd1 commit cd29f5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import { base } from '$app/paths';
1212
import CreateProject from '$lib/layout/createProject.svelte';
1313
import { Modal } from '$lib/components';
14+
import { currentPlan } from '$lib/stores/organization';
1415
1516
const teamId = page.params.organization;
1617
export let regions: Array<Models.ConsoleRegion> = [];
@@ -70,6 +71,10 @@
7071
{regions}>
7172
</CreateProject>
7273
<svelte:fragment slot="footer">
73-
<Button.Button type="submit" variant="primary" size="s">Create</Button.Button>
74+
<Button.Button
75+
disabled={projects && projects >= $currentPlan?.projects}
76+
type="submit"
77+
variant="primary"
78+
size="s">Create</Button.Button>
7479
</svelte:fragment>
7580
</Modal>

0 commit comments

Comments
 (0)