    (fn [{:keys [props state]}]
      (let [nav-context (nav/parse-segment (:nav-context props))
            page (keyword (:segment nav-context))]
-       (when-not (contains? #{:import-data :workspaces :methods} page)
+       (when-not (contains? (set (map :key top-nav-bar-items)) page)
          (nav/navigate (:nav-context props) "workspaces"))
        [:div {}
 

         [:div {}
          [TopNavBar {:selected-item page
                      :on-nav (fn [item] (nav/navigate (:nav-context props) (name item)))}]]]
        (case page
          :import-data [import-data/Page {:nav-context nav-context}]
          :workspaces [workspaces/Page {:nav-context nav-context}]
          :methods [method-repo/Page {:nav-context nav-context}]
          [:div {} "Page not found."])]))})

;; Content to display when logged out
(react/defc LoggedOut

      spacer
      [Link {:href "#" :text "Support"}]]]))


(def top-nav-bar-items
  [{:key :workspaces
    :name "Workspaces"
    :component workspaces/Page}
   {:key :methods
    :name "Method Repository"
    :component method-repo/Page}
   {:key :import-data
    :name "Import Data"
    :component import-data/Page}
   ])


(react/defc TopNavBarLink
  {:render
   (fn [{:keys [props state]}]
