    [:td.text-right (currency-format (:polarized-value item))]
    [:td.text-right (currency-format (:balance item))]])
 
-(defn- items-table []
+(defn- items-table
+  [{:keys [items]}]
   [:table.table.table-striped.table-hover
    [:thead
     [:tr

       (not= 0 (-> items last :index))))

(defn- next-query-range
  [[prev-start]]
  (let [latest (:latest-transaction-date account)
        start (if prev-start
                (t/minus prev-start (t/months 3))

     [:th.col-sm-2.text-right "Amount"]
     [:th.col-sm-2.text-right "Balance"]]]
   [:tbody
    (if-let [items @items]
      (map item-row items)
      [:tr [:td {:colSpan 4} [:span.inline-status "Loading..."]]])]])

