From c6770f43c77b717bd9f791139c2ea1ffa5bffd8c Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Fri, 20 Sep 2024 14:38:53 +0200 Subject: [PATCH] Move out of legacy --- frontend/src/app/main/refs.cljs | 9 +++------ frontend/src/app/main/ui/workspace/tokens/token_set.cljs | 7 ++++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 8f4ef4d6a..6687ef60f 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -465,13 +465,10 @@ (def workspace-token-themes (l/derived #(or (some-> % ctob/get-themes) []) tokens-lib)) -(dm/legacy - (def workspace-selected-token-set-id - (l/derived - wtts/get-selected-token-set-id - st/state - =)) +(def workspace-selected-token-set-id + (l/derived wtts/get-selected-token-set-id st/state)) +(dm/legacy (def workspace-active-theme-ids (l/derived wtts/get-active-theme-ids st/state)) diff --git a/frontend/src/app/main/ui/workspace/tokens/token_set.cljs b/frontend/src/app/main/ui/workspace/tokens/token_set.cljs index 237b778cd..c20898d74 100644 --- a/frontend/src/app/main/ui/workspace/tokens/token_set.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/token_set.cljs @@ -1,9 +1,10 @@ (ns app.main.ui.workspace.tokens.token-set (:require [app.common.data :refer [ordered-map]] + [app.common.data.macros :as dm] + [app.common.types.tokens-lib :as ctob] [app.main.ui.workspace.tokens.token :as wtt] - [clojure.set :as set] - [app.common.types.tokens-lib :as ctob])) + [clojure.set :as set])) (defn get-workspace-tokens-lib [state] (get-in state [:workspace-data :tokens-lib])) @@ -167,7 +168,7 @@ ;; === Set selection (defn get-selected-token-set-id [state] - (or (get-in state [:workspace-local :selected-token-set-id]) + (or (dm/legacy (get-in state [:workspace-local :selected-token-set-id])) (some-> (get-workspace-tokens-lib state) (ctob/get-sets) (first)