                                  (stop-ws))
        :reagent-render (fn []
                          [:div {:id "window"}
-                          [sidebar @sidebar-tab-stats]
+                          [sidebar]
                           [chat]])})))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    (let [props-li (fn [id]
                     (if (= (:active sidebar-stats) id)
                       {:id (str id) :class "tab-btn active"}
                       {:id (str id) :class "tab-btn"}))]
      [:div {:id "sidebar-tabs" :class "bottom-tabs"}
       [:ul {:class "tabs"}
        [:li (props-li :friends)
         [:a "FRIENDS"]]
        [:li (props-li :chat)
         [:a "CHAT"]]]])))

(defn sidebar [sidebar-stats]
  (fn [sidebar-stats]
    [:div {:id "sidebar"}
     [sidebar-header @user-info sidebar-stats]
     [sidebar-pane sidebar-stats]
     [sidebar-tabs sidebar-stats]]))

(defn chat []
  (fn []

      [:div {:class "title"} "Threads Panel"]])
  )

(defn sidebar-header [user]
  [:div {:id "sidebar-header" :class "header"}
   [user-profile user]])

(defn sidebar-pane [sidebar-stats]
  (fn [sidebar-stats]
    (if (= (:active sidebar-stats) :friends)
      [sidebar-friends-pane sidebar-stats]
      [sidebar-threads-pane sidebar-stats])))
