             :value       @new-tag-atom
             :on-change   #(reset! new-tag-atom (-> % .-target .-value))
             :on-key-down #(if (= (.-which %) 13)
-                            (add-tag tags-atom new-tag-atom state reload-fn))}]))
+                            (add-tag tags-atom new-tag-atom state))}]))
 
 (defn tags
   ([tags-atom] (tags tags-atom true))

(ns salava.core.ui.tag
  (:require [clojure.string :refer [trim lower-case]]
            [salava.core.i18n :refer [t]]
            [salava.core.ui.helper :refer [plugin-fun]]
            [reagent.session :as session]))

(defn add-tag
  ([tags-atom new-tag-atom]

                   :dangerouslySetInnerHTML {:__html "&times;"}
                   :on-click #(remove-tag tags-atom tag)}])])))
  ([tags-atom state reload-fn]
   (into [:div.tag-labels]
         (for [tag @tags-atom]
           [:span {:class "label label-default"}
            tag
            [:a {:class "remove-tag"
                 :dangerouslySetInnerHTML {:__html "&times;"}
                 :on-click #(do
                              (.preventDefault %)
                              (remove-tag tags-atom tag)
                              (save-settings state))}]]))))
