   (re-frame/register-handler
    :initialize-app-state
    (fn [db [_ state]]
-     state)))
+     state))
+
+  (re-frame/register-handler
+   :view-site
+   (fn [db [_ site-id]]
+     (-> db
+         (assoc :page-key :comic-list)))))
 
 (defn main-panel
   [page-key]
   (case page-key
-    :site [site-list/site-list-container]
+    :site-list [site-list/site-list-container]
+    :comic-list [comic-list/comic-list-container]
     [base/four-oh-four]))
 
 (defn main-panel-container []

(ns comic-reader.main
  (:require
    [comic-reader.ui.base :as base]
    [comic-reader.ui.site-list :as site-list]
    [reagent.core :as reagent]
    [reagent.ratom :refer-macros [reaction]]
    [re-frame.core :as re-frame]))

  (enable-console-print!)
  (setup!)
  (site-list/setup!)
  (comic-list/setup!)
  (re-frame/dispatch [:initialize-app-state {:page-key :site-list}])
  (api/get-sites {:on-success #(re-frame/dispatch [:set-site-list %])})
  (reagent/render-component [main-panel-container]
                            (.getElementById js/document "app")))

