From cbba25f939a12026816c1b8202d821f57606f248 Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Thu, 21 Nov 2024 16:25:04 -0500
Subject: Clean up extraneous variables

Just use state, don't derive from a non-state local variable.
---
 ui/lib/components/CreateChannelForm.svelte | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'ui/lib/components/CreateChannelForm.svelte')

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>
 
-- 
cgit v1.2.3

