Skip to content

Commit fa8bc40

Browse files
committed
fix more issues
1 parent 2456bb3 commit fa8bc40

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

src/lib/layout/createProject.svelte

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,25 @@
1212
import { filterRegions } from '$lib/helpers/regions';
1313
import type { Snippet } from 'svelte';
1414
15-
let projectName = $state('');
16-
let id = $state('');
17-
let regions = $state<Array<Models.ConsoleRegion>>([]);
18-
let region = $state('');
19-
let showTitle = $state(true);
20-
let projects = $state<number | undefined>(undefined);
21-
let { submit }: { submit?: Snippet } = $props();
15+
let {
16+
projectName = $bindable(''),
17+
id = $bindable(''),
18+
regions = [],
19+
region = $bindable(''),
20+
showTitle = true,
21+
projects = undefined,
22+
submit,
23+
onsubmit
24+
}: {
25+
projectName: string;
26+
id: string;
27+
regions: Array<Models.ConsoleRegion>;
28+
region: string;
29+
showTitle: boolean;
30+
projects?: number;
31+
submit?: Snippet;
32+
onsubmit?: (event: Event) => void;
33+
} = $props();
2234
2335
let showCustomId = $state(false);
2436
let projectsLimited = $derived(
@@ -35,6 +47,7 @@
3547
<form
3648
onsubmit={(e) => {
3749
e.preventDefault();
50+
onsubmit?.(e);
3851
}}>
3952
<Layout.Stack direction="column" gap="xxl">
4053
{#if showTitle}

src/routes/(console)/onboarding/create-project/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
bind:projectName
100100
bind:id
101101
bind:region
102-
on:submit={createProject}>
102+
showTitle={true}
103+
onsubmit={createProject}>
103104
<svelte:fragment slot="submit">
104105
<Layout.Stack direction="row" justifyContent="flex-end">
105106
<Button.Button type="submit" variant="primary" size="s">

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
onSubmit={create}
6464
bind:error>
6565
<CreateProject
66-
{projects}
6766
showTitle={false}
6867
bind:id
6968
bind:projectName={name}

0 commit comments

Comments
 (0)