       [:h3 (:name jedi)]
       [:h6 (str "Homeworld: " (get-in jedi [:homeworld :name]))]])])
 
-(defn dark-jedi-list []
-  (let [jedis (pad 5 nil (:jedis @app-state))]
+(defn dark-jedi-list [current-planet jedis]
+  (let [padded-jedis (pad 5 nil @jedis)]
     [:div {:class "css-root"}
-     [planet-monitor (:planet @app-state)]
+     [planet-monitor current-planet]
 
      [:section {:class "css-scrollable-list"}
       [:ul {:class "css-slots"}
-       (for [jedi jedis]
+       (for [jedi padded-jedis]
          (let [key (or
                      (:name jedi)
                      (gensym "jedi"))] ; use random name if no name present

       [:button {:class "css-button-down"}]]]]))

(reagent/render-component
  [dark-jedi-list]
  (. js/document (getElementById "app")))

(defn on-js-reload []

(ns ^:figwheel-always flux-challenge-re-frame.core
  (:require
    [clojure.walk :refer [keywordize-keys]]
    [reagent.core :as reagent]
    [chord.client :refer [ws-ch]]
    [cljs.core.async :refer [<!]]
    [cljs-http.client :as http])
  (:require-macros
    [cljs.core.async.macros :refer [go]]
    [reagent.ratom :refer [reaction]]))

(enable-console-print!)

