       [:div {:class "title"} "Threads Panel"]])
   )
 
-(defn sidebar-header [user sidebar-stats]
+(defn sidebar-header [user]
   [:div {:id "sidebar-header" :class "header"}
    [user-profile user]])
 
 (defn sidebar-pane [sidebar-stats]
-  (fn [tab-stats]
+  (fn [sidebar-stats]
     (if (= (:active sidebar-stats) :friends)
       [sidebar-friends-pane sidebar-stats]
       [sidebar-threads-pane sidebar-stats])))

       ]]])
  (let [ch-out (chan)
        {:keys [ch-in stop-ws]} (init-ws! "/app/ws" ch-out)
        msg-handler (fn [{:keys [id [ev-id {:keys [data] :as ?data} :as event]] :as ev-msg} val] (js/console.log "id: " id " data: " (:data ?data) " event: " ev-id))]
    (r/create-class
      {:component-will-mount (fn [_]
                               (js/console.log "app component -- will mount")

                                 (stop-ws))
       :reagent-render (fn []
                         [:div {:id "window"}
                          [sidebar]
                          [chat]])})))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
