#37: Well, THAT was easy!
Protective wrapper around :page rendering so that the initial, transient null value doesn't get rendered!
This commit is contained in:
parent
b1956def91
commit
72b4f058ed
|
@ -71,11 +71,16 @@
|
|||
: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
|
||||
[:header
|
||||
[ui/navbar]]
|
||||
[(pages @(rf/subscribe [:page]))]])
|
||||
[:header
|
||||
[ui/navbar]]
|
||||
(let [content (pages @(rf/subscribe [:page]))]
|
||||
(if content [content]
|
||||
[:div.error (str "No content in page " :page)]))])
|
||||
|
||||
;; -------------------------
|
||||
;; Routes
|
||||
|
|
Loading…
Reference in a new issue