          ^{:key (:name phone)} [phone-component phone])])))
 
 (defn search-component
+  "component for the search input"
   []
   (let [search-input (re-frame/subscribe [:search-input])])
   (fn []

   [:p (:snippet phone)]])

(defn matches-query?
 [search-input phone]
 (if (= "" search-input)
   true
   (boolean (or
             (re-find (re-pattern search-input) (:name phone))
             (re-find (re-pattern search-input) (:snippet phone))))))

(defn phones-component
  []
  (let [phones (re-frame/subscribe [:phones])
        search-input (re-frame/subscribe [:search-input])

(re-frame/register-handler
 :order-prop-changed
 handle-order-prop-changed)

;; -------------------------
;; Phone List View

(defn phone-component
  "individual phone component in the phoens list view"
  [phone]
  [:li {:class "thumbnail phone-listing"}
   [:a {:href (str "#/phones/" (:id phone))
