                (dom/button 
                  #js {:onClick (fn [e]
                                  (.preventDefault e)
-                                 (new-search data state owner))}
+                                 (when (not (empty? (:text state)))
+                                   (set! js/window.location.hash ((-> @data :routes :search) 
+                                                                  {:query (:text state)}))
+                                   (om/set-state! owner :text ""))
+                                 )}
                  "Search")
                ; clear button
                (dom/button
                  #js {:onClick (fn [e]
                                  (.preventDefault e)
                                  (om/set-state! owner :text "")
-                                 (om/transact! data reset-state)
                                  )}
                  "Clear")))))
 

                   )))))
  (atom initial-state)
  {:target (. js/document (getElementById "app"))})

             (dom/button 
               #js {:onClick (fn [e]
                               (.preventDefault e)
                               (set! js/window.location.hash ""))}
               "Cancel"))))

;; App -----------------------------------------------
