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:
parent
e5894ceea1
commit
a12b42c4d5
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
=))
|
||||
|
||||
|
|
Loading…
Reference in a new issue