mirror of
https://github.com/penpot/penpot.git
synced 2026-03-12 21:36:39 +00:00
Minor fix on colors page initialization event.
This commit is contained in:
@@ -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))))
|
||||
|
||||
Reference in New Issue
Block a user