From 65b579c6b6ee58071c739986de240859ccdf0757 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 14 Sep 2020 15:33:58 +0200 Subject: [PATCH] :fire: Remove unused code. --- frontend/src/app/main/refs.cljs | 6 ------ frontend/src/app/main/ui/workspace/sidebar/align.cljs | 2 +- .../src/app/main/ui/workspace/sidebar/options/page.cljs | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 361d9a580..3c74b88de 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -121,12 +121,6 @@ (def workspace-snap-data (l/derived :workspace-snap-data st/state)) -;; TODO: BROKEN & TO BE REMOVED -(def workspace-data - (-> #(let [page-id (get-in % [:workspace-page :id])] - (get-in % [:workspace-data page-id])) - (l/derived st/state))) - (def workspace-page (l/derived (fn [state] (let [page-id (:current-page-id state) diff --git a/frontend/src/app/main/ui/workspace/sidebar/align.cljs b/frontend/src/app/main/ui/workspace/sidebar/align.cljs index f0af7e62e..d5ef9d6dc 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/align.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/align.cljs @@ -20,7 +20,7 @@ (let [selected (mf/deref refs/selected-shapes) ;; don't need to watch objects, only read the value - objects (:objects (deref refs/workspace-data)) + objects (deref refs/workspace-page-objects) disabled (cond (empty? selected) true diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs index 6ce8e19e8..10cce3c66 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/page.cljs @@ -18,9 +18,6 @@ [app.util.i18n :as i18n :refer [t]] [app.main.ui.workspace.sidebar.options.rows.color-row :refer [color-row]])) -(def options-iref - (l/derived :options refs/workspace-data)) - (defn use-change-color [page-id] (mf/use-callback (mf/deps page-id)