 (defn- on-change-page-state
   "Render the page on every state change."
   [_kwd _the-atom _old-state new-state]
-  (rum/request-render
-    (rum/mount (IndexApp new-state) app-container-el)))
+  (rum/mount (IndexApp new-state) app-container-el))
 
 (add-watch page-state :main on-change-page-state)
 

;;------------------------------------------------------------------------------

(def init-page!
  (once (fn []
          (fetch-tourney-state!)
          (fetch-info-page!)
          ;; trigger an initial render
          (swap! page-state identity))))

(init-page!)

(ns tourneybot-client.core
  (:require
    [cljsjs.marked]
    [cljsjs.moment]
    [clojure.string :refer [blank? lower-case]]
    [goog.functions :refer [once]]
    [rum.core :as rum]
    [tourneybot.data :refer [ensure-tournament-state
                             finished-status
                             game-finished?
                             game-statuses
                             games->results
                             in-progress-status
                             scheduled-status]]
    [tourneybot.util :refer [atom-logger
                             by-id
                             fetch-ajax-text
                             fetch-json-as-cljs
                             game->date
                             js-log
                             log
                             tourney-bot-url]]))

;;------------------------------------------------------------------------------
;; Constants
