mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02: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]
|
(defrecord Initialize [type id]
|
||||||
rs/UpdateEvent
|
rs/UpdateEvent
|
||||||
(-apply-update [_ state]
|
(-apply-update [_ state]
|
||||||
(let [type (or type :builtin)
|
(let [type (or type :own)
|
||||||
id (or id (if (= type :builtin) 1 nil))
|
|
||||||
data {:type type :id id :selected #{}}]
|
data {:type type :id id :selected #{}}]
|
||||||
(-> state
|
(-> state
|
||||||
(assoc-in [:dashboard :colors] data)
|
(assoc-in [:dashboard :colors] data)
|
||||||
(assoc-in [:dashboard :section] :dashboard/colors))))
|
(assoc-in [:dashboard :section] :dashboard/colors))))
|
||||||
|
|
||||||
;; rs/EffectEvent
|
|
||||||
;; (-apply-effect [_ state]
|
|
||||||
;; (when (nil? (:color-colls-by-id state))
|
|
||||||
;; (reset! st/loader true)))
|
|
||||||
|
|
||||||
rs/WatchEvent
|
rs/WatchEvent
|
||||||
(-apply-watch [_ state s]
|
(-apply-watch [_ state s]
|
||||||
(rx/of (conditional-fetch))))
|
(rx/of (conditional-fetch))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue