Merge branch 'develop' into feature/36

This commit is contained in:
Simon Brooke 2017-03-29 06:40:49 +01:00
commit 14ec599fd2
2 changed files with 13 additions and 7 deletions

View file

@ -71,11 +71,16 @@
:map #'map-page :map #'map-page
}) })
(defn page [] (defn page
"Render the single page of the app, taking the current panel from
the :page key in the state map."
[]
[:div [:div
[:header [:header
[ui/navbar]] [ui/navbar]]
[(pages @(rf/subscribe [:page]))]]) (let [content (pages @(rf/subscribe [:page]))]
(if content [content]
[:div.error (str "No content in page " :page)]))])
;; ------------------------- ;; -------------------------
;; Routes ;; Routes

View file

@ -36,7 +36,8 @@
(reg-event-db (reg-event-db
:set-active-page :set-active-page
(fn [db [_ page]] (fn [db [_ page]]
(assoc db :page page))) (if page
(assoc db :page page))))
(reg-event-db (reg-event-db