From 0281e0dba45eb38bd443481bcb5e36c4882d8cdd Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Mon, 7 Apr 2025 16:42:43 +0200 Subject: [PATCH] :construction: Explicit state handling --- .../app/main/ui/workspace/tokens/modals/themes.cljs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs b/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs index a132495e3..9fa2aa968 100644 --- a/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs @@ -421,12 +421,12 @@ state (deref state*) change-view (mf/use-fn - (fn [type & [state']] + (fn [type & {:keys [theme-path]}] (swap! state* (fn [current-state] - (merge - {:type type - :prev-type (:type current-state)} - state'))))) + (cond-> current-state + :always (assoc :type type + :prev-type (:type current-state)) + :theme-path (assoc :theme-path theme-path)))))) component (case (:type state) :empty-themes empty-themes