summaryrefslogtreecommitdiff
path: root/ui/lib/components/CreateChannelForm.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'ui/lib/components/CreateChannelForm.svelte')
-rw-r--r--ui/lib/components/CreateChannelForm.svelte7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/lib/components/CreateChannelForm.svelte b/ui/lib/components/CreateChannelForm.svelte
index afa3f78..d50e60d 100644
--- a/ui/lib/components/CreateChannelForm.svelte
+++ b/ui/lib/components/CreateChannelForm.svelte
@@ -2,17 +2,16 @@
import { createChannel } from '$lib/apiServer';
let name = $state('');
- let pending = false;
- let disabled = $derived(pending);
+ let disabled = $state(false);
async function handleSubmit(event) {
event.preventDefault();
- pending = true;
+ disabled = true;
const response = await createChannel(name);
if (200 <= response.status && response.status < 300) {
name = '';
}
- pending = false;
+ disabled = false;
}
</script>