Merge branch 'develop' into feature/36
This commit is contained in:
		
						commit
						14ec599fd2
					
				
					 2 changed files with 13 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,9 +34,10 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
(reg-event-db
 | 
			
		||||
  :set-active-page
 | 
			
		||||
  (fn [db [_ page]]
 | 
			
		||||
    (assoc db :page page)))
 | 
			
		||||
 :set-active-page
 | 
			
		||||
 (fn [db [_ page]]
 | 
			
		||||
   (if page
 | 
			
		||||
     (assoc db :page page))))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(reg-event-db
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue