 
         (let [item (first (filter #(= (% :key) page) top-nav-bar-items))]
           (if item
-            [(item :component) {:nav-context nav-context}]
+            ((item :render) {:nav-context nav-context})
             [:div {} "Page not found."]))]))})
 
 


; Temporary replacement for the Broad Logo.
(defn- text-logo []
  [:div {:style {:fontSize "32px" :color (:button-blue style/colors) :fontWeight "bold"}} "FireCloud"])

(defn- footer []
  (let [thisyear (.getFullYear (js/Date.))

(def top-nav-bar-items
  [{:key :workspaces
    :name "Workspaces"
    :render #(react/create-element workspaces/Page %)}
   {:key :methods
    :name "Method Repository"
    :render #(react/create-element method-repo/Page %)}])


(react/defc TopNavBarLink
