         (get-in [:unit/type :unit-type/image])
         (string/replace "COLOR" color-name))))
 
-(defn board-unit [{:keys [conn dispatch] :as app} q r]
+(defn board-unit [{:as view-ctx :keys [conn dispatch]} q r]
   (when-let [unit @(subs/unit-at conn q r)]
     (let [[x y] (offset->pixel q r)
           image (unit-image unit)]


;; TODO: turn entire game interface into it's own component

(defn app-root [{:keys [conn dispatch] :as app}]
  [:div
   [new-game-settings app]
   [faction-settings app]
   [unit-picker app]
   ;; TODO: break win dialog out into it's own component
   ;; TODO: add continue + start new game buttons
   [:> js/ReactBootstrap.Modal {:show @(subs/show-win-message? conn)

    (kickstarter-alert)
    [:div.row
     [:div.col-md-2
      [faction-credits view-ctx]
      [faction-list view-ctx]
      [faction-actions view-ctx]]
     [:div.col-md-10
      [faction-status view-ctx]
      [board view-ctx]]]]
   (footer)])
