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


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; TODO - Separate concerns : cards values and their id (for better association)

(def card-list (r/atom []))

(defn add-task-to!
  "Add a new task in the card-list"
  [card-id task]
  (defn add-if! [card]
    (if (= card-id (:card-id card))
      (update-in card [:tasks] conj (create-task! task false))
      card))
  (swap! card-list #(mapv add-if! %)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


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