mirror of
https://github.com/penpot/penpot.git
synced 2025-04-04 19:11:20 -05:00
Minor fix on colors page initialization event.
This commit is contained in:
parent
02c7793050
commit
2764ea0d96
1 changed files with 1 additions and 7 deletions
|
@ -38,18 +38,12 @@
|
|||
(defrecord Initialize [type id]
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(let [type (or type :builtin)
|
||||
id (or id (if (= type :builtin) 1 nil))
|
||||
(let [type (or type :own)
|
||||
data {:type type :id id :selected #{}}]
|
||||
(-> state
|
||||
(assoc-in [:dashboard :colors] data)
|
||||
(assoc-in [:dashboard :section] :dashboard/colors))))
|
||||
|
||||
;; rs/EffectEvent
|
||||
;; (-apply-effect [_ state]
|
||||
;; (when (nil? (:color-colls-by-id state))
|
||||
;; (reset! st/loader true)))
|
||||
|
||||
rs/WatchEvent
|
||||
(-apply-watch [_ state s]
|
||||
(rx/of (conditional-fetch))))
|
||||
|
|
Loading…
Add table
Reference in a new issue