            :on-success (d/set-html! (d/by-id "userBaskets") (render/user-baskets baskets))
            :on-error (js/alert (str "Error loading user baskets"))))
 
-(defn save-basket []
-    (srm/rpc
-     (api/save-basket (serialise-basket)) [response]
-     :on-success (do (js/alert (str "Basket saved! Id: " (:id response)))
-                     (basket-id (:id response)) (set-basket-saved!)
-                     (load-user-baskets))
-     :on-error (js/alert (str "Error saving basket"))))
-
-
-(def item-added (pubsub/publishize
-                 (fn [] {:item-name (d/value item-name-field)
-                         :qty (to-int (d/value item-qty-field))}) bus))
-
 (def item-deleted (pubsub/publishize (fn [e] {:item e}) bus))
 
 (def quantity-changed (pubsub/publishize

      (event/listen! (css/sel new-item "button[rel=decrement]") :click #(quantity-changed :dec true (event/target %)))
      (event/listen-once! (css/sel new-item "button[rel=complete]") :click #(completed-item (event/target %))))))

(defn item-completed [{:keys [item]}]
  (d/add-class! item "btn-success")
  (d/append! completed-items-list (d/detach! (x/xpath item "../.."))))

            [domina.css :as css]
            [domina.xpath :as x]
            [eatme.client.render :as render]
            [clojure.string :as string]
            [one.browser.history :as history])
  (:require-macros [shoreleave.remotes.macros :as srm]))

(def query-args (common/query-args-map))
(def hash-args (common/hash-args-map))

;; ### Browser REPL
;; If you add a `repl` as a query-string arg, even on the live site,
