 (secretary/defroute "/propose" []
   (session/put! :current-page #'propose-page))
 
-(secretary/defroute "/bet/:id" {:as params}
+(secretary/defroute "/bet/:id" {id :id}
   (session/put! :current-page #'bet-page)
-  (js/console.log (str "Bet: " (:id params)))
+  (js/console.log (str "Bet: " id))
   )
 
 (secretary/defroute "/profile" []

(defn activate-dropdowns []
  (.dropdown ($ ".profile-dropdown-navbar-item"))
  (.dropdown ($ ".signin-dropdown-navbar-item"))
             )
(defn hook-browser-navigation! []
  (doto (History.)
    (events/listen
     EventType/NAVIGATE
     (fn [event]
       (secretary/dispatch! (.-token event))))
    (.setEnabled true)))

;; -------------------------
;; Initialize app

(defn mount-root []
  (reagent/render [current-page] (.getElementById js/document "app")))


;;$(".profile-dropdown-navbar-item").dropdown()

(defn init! []
  (hook-browser-navigation!)
  (mount-root)
  (activate-dropdowns)
)

    [navbar-dropdowns-data]
    [:nav
     [:div.nav-wrapper
       [:a {:href "" :class "brand-logo"} "Bababet"]
       [:ul {:class "right hide-on-med-and-down"}
        [:li
         [:a {:href "#/"} "Home"]]
        [:li
         [:a {:href "#/propose"} "Propose"]]
        [:li
         [:a {:href "#" :onclick "return false;" :class "profile-dropdown-navbar-item" :data-activates "profile-dropdown" }
          "Profile"
          [:i {:class "mdi-navigation-arrow-drop-down right"}]]]
        [:li
         [:a {:href "#" :class "signin-dropdown-navbar-item" :data-activates "signin-dropdown" }
          "Sign in"
          [:i {:class "mdi-navigation-arrow-drop-down right"}]]]
      ]
