 
 
 ;; (def teas-list (reagent/atom nil))
-(def new-tea (reagent/atom nil))
+;; (def new-tea (reagent/atom nil))
 (def edit-tea-id (reagent/atom nil))
 (def edit-tea (reagent/atom nil))
 (def edit-tea-snap (reagent/atom nil))

                    .-target
                    .-value)))

(def sync-new-tea (partial sync-atom-to-event new-tea))
(def sync-edit-tea (partial sync-atom-to-event edit-tea))

(defn tea-adder
  "A component for the tea-adder form"
  []
  (fn []
    [:div.row
     [:div.col-md-12
      [:form {:post "/api/newtea"}
       [:input.form-control {:field :text :id :in-tea :placeholder "Name of New Tea" :value @new-tea :on-change sync-new-tea }
        [:input.btn.btn-primary {:type "submit" :value (str "Add " @new-tea) :on-click #(post-to-teas-db @new-tea)}]]]]]))




  []
  (fn []
    [:div.form-group
     [:div.row [:div.col-md-12
       [:button.btn.btn-info {:on-click (fn [_] (swap! show-edit not))} "Show/Hide edit form"]
       [:div.p (str "Preview: " (or @edit-tea-snap "*no tea selected*") " -> " (or @edit-tea "*no tea selected*"))]
       [:div.p]
