   (accountant/dispatch-current!)
   (mount-root))
 
+(swap! app-state #(assoc % :current-entity (first entities)))
+
 (init!)

(ns clj-money.core
  (:require [reagent.core :as reagent]
            [secretary.core :as secretary :include-macros true]
            [accountant.core :as accountant]))

(defn nav []
  [:nav.navbar.navbar-inverse


    [:div#navbar.collapse.navbar-collapse
     [:ul.nav.navbar-nav
      [:li.dropdown {:role "presentation"}
       [:a.dropdown-toggle
        {:href "#"
         :data-toggle "dropdown"
         :role "button"
         :aria-haspopup true}
        (-> @app-state :current-entity :name)
        [:span.caret]]
       [:ul.dropdown-menu
        (concat
          (for [entity entities]
            ^{:key entity} [:li {:class (when (= (:id entity)
                                                 (:id (:current-entity @app-state)))
                                          "active")}
                            [:a {:href "#"
                                 :on-click (fn []
                                             (.log js/console "selected entity")
                                             (swap! app-state
                                                    #(assoc % :currency-entity entity)))}
                             (:name entity)]])
          [[:li.divider {:role "separator"}]
           [:li
            [:a {:href "#"} "Manage Entities"]]])]]]]]])

(defn home-page []
  [:div
