From 0a86e3a65115de4eacfc7d602b734a69bca79c54 Mon Sep 17 00:00:00 2001
From: Florian Schroedl <flo.schroedl@gmail.com>
Date: Fri, 14 Jun 2024 10:52:30 +0200
Subject: [PATCH] Simplify

---
 frontend/src/app/main/ui/workspace/tokens/modal.cljs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/frontend/src/app/main/ui/workspace/tokens/modal.cljs b/frontend/src/app/main/ui/workspace/tokens/modal.cljs
index f5d71acfc..755aa7a54 100644
--- a/frontend/src/app/main/ui/workspace/tokens/modal.cljs
+++ b/frontend/src/app/main/ui/workspace/tokens/modal.cljs
@@ -61,9 +61,8 @@
         state (mf/use-state initial-fields)
 
         on-update-state-field (fn [idx e]
-                                (->> (dom/get-target-val e)
-                                     (assoc-in @state [idx :value])
-                                     (reset! state)))
+                                (let [value (dom/get-target-val e)]
+                                  (swap! state assoc-in [idx :value] value)))
 
         on-submit (fn [e]
                     (dom/prevent-default e)