   (if (= identity f)
      reverse
      identity))
-  
+
 (defn column-sorter [column]
   (swap! sort-order reverse-sort)
   (update-in my-data [:data] (fn [data] (@sort-order  (sort-by column data)))))

  (:require [quiescent :as q :include-macros true]
            [quiescent.dom :as d]))

(q/defcomponent User
  [data header-meta]
  (apply d/tr {}
         (map (fn [key] (d/td {} (get data key))) (map :key header-meta))))

(defn render-header [header]
  (d/thead {}
           (apply d/tr {}
                  (map (fn [h] (d/th {:className (:className h) 
                                      :onClick (:onClick h)} (:title h)))
                       header))))


                      :country "France"}]
              :meta {:header
                     [{:key :email :title "Email" :className "email" :onClick
                       (create-sorter column-sorter :email) :renderer (create-email-column-renderer)}
                      {:key :name :title "Name"
                       :onClick
                       (create-sorter column-sorter :name)}
