 
     om/IRenderState
     (render-state [this state]  
-      (let [current-index (nth (om/observe owner (current-index-cur)) 0)]
-        (if (< current-index (count state))
-          (let [current-repo (nth state current-index)] 
-            ;; check registered or not   
-            (dom/h2 nil (get current-repo "full_name")))
+      (let [current-index (nth (om/observe owner (current-index-cur)) 0)
+            repos (:repos state)]    
+        (if (< current-index (count repos))
+          (om/build repo-config-panel {:repo (nth repos current-index)
+                                       :auth (:auth state)})                              
           (dom/h2 nil "Add your repos"))))))
 
 (defn widget [state owner]

    om/IRender
    (render [this]
      (apply dom/div nil
        (map-indexed repo-button state)))))           

(defn repo-detail-view [state owner]
  (reify
    om/IInitState

      (let [repos (vec (get-in state [:me "repos"]))]  
        (dom/div nil
          (om/build repo-list-view repos)
          (om/build repo-detail-view {:repos (:me state)
                                      :auth (:auth state)}))))))                                       

(om/root widget app-state {:target (.getElementById js/document "content")})
