   []
   (fn []
     [:div.form-group
-     [:div.row
-      [:div.col-md-12
+     [: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]

  [tea-name]
  ;; (println "post-to-teas-db hit, params: " tea-name)
  (ajax/POST "/api/newtea" {:params {:new-tea tea-name} :format :json}
             :handler (fn [] (println "New Tea Posted") (get-teas) (reset! new-tea nil))
             :error-handler (fn [err] (println "New Tea Failed To Post" err))))



               :keywords? true})
    app-db))

(re-frame/register-handler
  :initialize-db
  (fn [_ _]
    {:teas-list []
     :new-tea "BLAH"}))

(defn new-tea-entered
  [app-state [_ new-tea-input]]
  (assoc-in app-state [:new-tea] new-tea-input))

(re-frame/register-handler
  :new-tea-entry
  new-tea-entered)

(re-frame/register-sub
  :teas
  (fn [db]
    (reaction (:teas-list @db))))

(re-frame/register-sub
  :new-tea
  (fn [db]
    (reaction (:new-tea @db))))


(defonce app-db (reagent/atom {}))
