0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Simplfy workspace-file-colors ref impl

This commit is contained in:
Andrey Antukh 2024-12-10 14:56:15 +01:00
parent e5894ceea1
commit a12b42c4d5

View file

@ -233,10 +233,8 @@
(l/derived :workspace-data st/state))
(def workspace-file-colors
(l/derived (fn [data]
(when data
(->> (:colors data)
(d/mapm #(assoc %2 :file-id (:id data))))))
(l/derived (fn [{:keys [id] :as data}]
(some-> (:colors data) (update-vals #(assoc % :file-id id))))
workspace-data
=))