 ;;------------------------------------------------------------------------------
 
 ;; TODO: take "tiesAllowed?" into account here
-(rum/defc SwissResultsRow < rum/static
+(rum/defc SwissResultsRow < (merge rum/static index-key-fn-mixin)
   [idx {:keys [team-name games-won games-lost games-tied
                points-won points-lost points-diff
                victory-points]}]

           menu-showing?
           teams
           title]}]
  (let [active-games (get-games-in-group games active-page)]
    [:div.admin-container
      (Header title)
      (if (= active-page "teams")
        (TeamsPage teams)
        (GamesList (get page-titles active-page) active-games))
      (Footer)
      (when menu-showing?
        (LeftNavMenu))
      (when loading-modal-showing?
        (LoadingModal loading-modal-txt))
      (when error-modal-showing?
        (ErrorModal))
      (when edit-game-modal-showing?
        (EditGameModal edit-game-modal-game))
      (when edit-team-modal-showing?
        (EditTeamModal edit-team))]))

;;------------------------------------------------------------------------------
;; Top Level Component

           :on-touch-start (partial click-edit-game game-id)}
          "Edit"]]]))

(def page-titles
  "Mapping of page-ids to titles."
  {"swiss-round-1" "Swiss Round 1"
   "swiss-round-2" "Swiss Round 2"
   "swiss-round-3" "Swiss Round 3"
   "swiss-round-4" "Swiss Round 4"
   "swiss-round-5" "Swiss Round 5"
   "bracket-play" "Bracket Play"
   "all-games" "All Games"})

(rum/defc GamesList < rum/static
  [teams all-games page-id]
  (let [title (get page-titles page-id)
        games (get-games-in-group all-games page-id)
        is-swiss-round? (every? is-swiss-game? games)
        is-bracket-play? false
        swiss-round (:swiss-round (first games) false)]
        ; games-for-this-swiss-round (filter #(<= (:swiss-round (second %)) swiss-round)
        ;                                    (vals games))
        ; swiss-round-results (games->results)]
    [:section
      [:h2.title-eef62 title]
      [:div.flex-052ba
