                  :name "history"
                  :value @current
                  :min 0
-                 :max @state-count
+                 :max (count @h)
                  :on-change (fn [e]
                               (fire :history-navigated
                                     (->> e .-target .-value js/parseInt)))}]]])))

(defn history-component
  [db]
  (let [h (r/cursor db [:states])
        state-count (r/cursor db [:count])
        current (r/cursor db [:current])]
    (fn [db]
      [:div {:class "wrapper"}

                                (= :reverse dir) (reverse)))]
     (go-loop []
       (when-let [index (<! indices-chan)]
         (fire :history-navigated index)
         (<! (timeout 30))
         (recur))))))
