diff --git a/src/lib/components/channelDialog.svelte b/src/lib/components/channelDialog.svelte index 2dfd4a2..d441dcd 100644 --- a/src/lib/components/channelDialog.svelte +++ b/src/lib/components/channelDialog.svelte @@ -7,11 +7,18 @@ import type { NewChannelSchema } from '$lib/types/schema'; import { Label } from '$lib/components/ui/label/index'; + let open: boolean = $state(false); let { data }: { data: SuperValidated> } = $props(); - const { form, errors, constraints, enhance } = superForm(data); + const { form, errors, constraints, enhance } = superForm(data, { + onResult: ({ result }) => { + if (result.type === 'success') { + open = false; + } + }, + }); - + Create Channel