Browse code

Add indexing to history elements

Joseph Weston authored on 05/12/2021 20:15:34
Showing 1 changed files
... ...
@@ -265,8 +265,8 @@
265 265
 (defn history []
266 266
   (let [history (re-frame/subscribe [::subs/cmd-history])]
267 267
     [:ul {:class (styles/history-style)}
268
-      (for [item @history]
269
-        [:li (-> item :input input) (-> item :output output)])]))
268
+      (for [[index item] (enumerated @history)]
269
+        ^{:key index} [:li (-> item :input input) (-> item :output output)])]))
270 270
 
271 271
 (defn main-panel []
272 272
   [:div {:class (styles/screen)}