mirror of
https://github.com/penpot/penpot.git
synced 2025-05-05 19:35:54 +02:00
🚧 Explicit state handling
This commit is contained in:
parent
1c209f49fc
commit
0281e0dba4
1 changed files with 5 additions and 5 deletions
|
@ -421,12 +421,12 @@
|
||||||
state (deref state*)
|
state (deref state*)
|
||||||
|
|
||||||
change-view (mf/use-fn
|
change-view (mf/use-fn
|
||||||
(fn [type & [state']]
|
(fn [type & {:keys [theme-path]}]
|
||||||
(swap! state* (fn [current-state]
|
(swap! state* (fn [current-state]
|
||||||
(merge
|
(cond-> current-state
|
||||||
{:type type
|
:always (assoc :type type
|
||||||
:prev-type (:type current-state)}
|
:prev-type (:type current-state))
|
||||||
state')))))
|
:theme-path (assoc :theme-path theme-path))))))
|
||||||
|
|
||||||
component (case (:type state)
|
component (case (:type state)
|
||||||
:empty-themes empty-themes
|
:empty-themes empty-themes
|
||||||
|
|
Loading…
Add table
Reference in a new issue