mirror of
https://github.com/penpot/penpot.git
synced 2025-02-26 08:45:34 -05:00
Remove state.colors namespace.
This commit is contained in:
parent
0a2d774b5e
commit
130895f2c3
1 changed files with 0 additions and 22 deletions
|
@ -1,22 +0,0 @@
|
||||||
(ns uxbox.main.state.colors
|
|
||||||
"A collection of functions for manage dashboard data insinde the state.")
|
|
||||||
|
|
||||||
(defn assoc-collection
|
|
||||||
"A reduce function for assoc the color collection
|
|
||||||
to the state map."
|
|
||||||
[state coll]
|
|
||||||
(let [id (:id coll)]
|
|
||||||
(assoc-in state [:colors-by-id id] coll)))
|
|
||||||
|
|
||||||
(defn dissoc-collection
|
|
||||||
"A reduce function for dissoc the color collection
|
|
||||||
to the state map."
|
|
||||||
[state id]
|
|
||||||
(update state :colors-by-id dissoc id))
|
|
||||||
|
|
||||||
(defn select-first-collection
|
|
||||||
"A reduce function for select the first color collection
|
|
||||||
to the state map."
|
|
||||||
[state]
|
|
||||||
(let [colls (sort-by :id (vals (:colors-by-id state)))]
|
|
||||||
(assoc-in state [:dashboard :collection-id] (:id (first colls)))))
|
|
Loading…
Add table
Reference in a new issue