 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defn render-task
-  [task]
+  [card-id task]
   [:li.checklist__task
    [:input {:type "checkbox" :default-checked (:done task)}]
    (:name task)
    [:a.checklist__task--remove
-    {:href "#"
-     :on-click #(js/alert "TODO - remove the task")}]
+    {:href "#" :on-click #(remove-task-from! card-id (:task-id task))}]
   ])
 
 (defn render-tasks
-  [tasks]
+  [card-id tasks]
   [:div.checklist
    [:ul
     (for [t tasks]
-      ^{:key (:task-id t)} [render-task t])]
+      ^{:key (:task-id t)} [render-task card-id t])]
   ])
 
 (defn card-side-color

(defn render-app
  []
  (let [search-text (r/atom "")
        on-search-enter (fn [e] (reset! search-text (.. e -target -value)))]
    (fn []
      [:div
       [:input.search-input

       (when @show-details
         [:div.card__details
          (:description card)
          [render-tasks (:card-id card) (:tasks card)]
          [render-add-list (:card-id card)]
         ])
       ])
