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/MessageInput.svelte | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

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

diff --git a/ui/lib/components/MessageInput.svelte b/ui/lib/components/MessageInput.svelte
index 26521e1..22456f3 100644
--- a/ui/lib/components/MessageInput.svelte
+++ b/ui/lib/components/MessageInput.svelte
@@ -5,16 +5,14 @@
 
   let form;
   let value = $state('');
-  let pending = false;
-
-  let disabled = $derived(pending);
+  let disabled = $state(false);
 
   async function onSubmit(event) {
     event.preventDefault();
-    pending = true;
+    disabled = true;
     await postToChannel(channel, value);
     form.reset();
-    pending = false;
+    disabled = false;
   }
 
   function onKeyDown(event) {
-- 
cgit v1.2.3

