 (ns ui.menu
   (:use [jayq.core :only [$]])
-  (:require [reagent.core :as reagent :refer [atom]]
-            [gtd.state :as state]
+  (:require [gtd.state :as state]
+            [reagent.core :as reagent :refer [atom]]
+            [secretary.core :as secretary]
             [utils.core :as utils]))
+
+(defn- goto
+  [route]
+  (secretary/dispatch! route))
 
 (defn- completion-bar
   [done total]

       (str ratio "% complete")]]]))

(defn- menu-item-component
  [& {:keys [project-id title item-id icon]}]
  (if icon
    [:li
     {:id (str "item-" item-id)
      :class (if (= project-id item-id)
               "menu-item clearfix selected"
               "menu-item clearfix")}
     [:h5
      [:i
       {:class (str "fa fa-fw fa-lg fa-" icon)}]

     :section-id "collect"
     :items [{:title "Inbox"
              :id "Inbox"
              :route "/inbox"
              :icon "inbox"}]]
    [menu-section-component
     :project-id project-id
