    :backgroundColor (-> card :category category->color)
   })
 
-(defn filter-by-status
-  "Filter card by status"
-  [status cards]
-  (filter #(= status (:status %)) (map second cards)))
-
- (defn filter-by-title
-   "Keep only cards that contains the searched string inside their title"
-   [title cards]
-   (if (empty? title)
-     cards
-     (filter #(utils/str-contains (-> % second :title) title) cards)))
+(defn filter-by-title
+  "Keep only cards that contains the searched string inside their title"
+  [title cards]
+  (if (empty? title)
+    cards
+    (filter #(utils/str-contains (-> % second :title) title) cards)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 

  )))

(defn render-column
  [status cards card-renderer]
  [:div.list
   [:h1 (status->str status)]
   (for [c (filter-by-status status cards)]
     ^{:key (:card-id c)} [card-renderer c])
  ])

(defn render-board
  ; TODO - Use group by instead of filter
  [cards card-renderer]
  [:div.app
   (for [status [:backlog :under-dev :done]]
     ^{:key status} [render-column status cards card-renderer])
  ])

(defn render-filter
  [filter-ref]

         (render-filter filter)
         [render-add-card on-add-card]
         [render-toggle-all on-toggle-all]
         [render-board
          (render-card on-toggle-card on-remove-task on-check-task on-add-task)
          @filtered]
        ]))
  ))

