 
 (defn- component-did-mount [arena cmpnt-state]
   ;; Add resize listener
-  (let [resize-fn #(on-resize arena cmpnt-state)]
+  (let [resize-fn (:resize-fn @cmpnt-state)]
     (.addEventListener js/window
                        "resize"
                        resize-fn))


(defn game-play [{:keys [game-id]}]
  (let [arena (re-frame/subscribe [:game/arena])
        cmpnt-state (reagent/atom {:resize-fn nil
                                   :timeout-fn nil})
        messages (re-frame/subscribe [:game/messages])
        user (re-frame/subscribe [:current-user])
        games (re-frame/subscribe [:games])]

    (set! (.-width canvas-element) dimension)
    (set! (.-height canvas-element) dimension)))

(defn- on-resize [arena-atom]
  (resize-canvas arena-atom)
  (js/setTimeout #(resize-canvas arena-atom)
                 100))

(defn- show-winner-modal
  [winner]
