From 827609db798c834e3acb1676e05c923f63eb6baf Mon Sep 17 00:00:00 2001 From: Eva Date: Tue, 16 Jan 2024 16:07:26 +0100 Subject: [PATCH] :bug: Fix go to library button --- .../workspace/sidebar/assets/typographies.cljs | 10 +++++----- .../workspace/sidebar/options/menus/text.cljs | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs index 2f549e67f..34ae000a6 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/typographies.cljs @@ -109,17 +109,17 @@ :on-drop on-drop} [:& typography-entry - {:typography typography + {:file-id file-id + :typography typography :local? local? - :on-context-menu on-context-menu - :on-change handle-change :selected? (contains? selected typography-id) :on-click on-asset-click + :on-change handle-change + :on-context-menu on-context-menu :editing? editing? :renaming? renaming? :focus-name? rename? - :external-open* open* - :file-id file-id}] + :external-open* open*}] (when ^boolean dragging? [:div {:class (stl/css :dragging)}])])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs index 74496773a..058421aab 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs @@ -204,8 +204,8 @@ (mf/deps more-options-open?) #(swap! state* assoc-in [:more-options] (not more-options-open?))) - typography-id (:typography-ref-id values) - typography-file (:typography-ref-file values) + typography-id (:typography-ref-id values) + typography-file-id (:typography-ref-file values) emit-update! (mf/use-fn @@ -228,14 +228,14 @@ (cond (and typography-id (not= typography-id :multiple) - (not= typography-file file-id)) + (not= typography-file-id file-id)) (-> shared-libs - (get-in [typography-file :data :typographies typography-id]) - (assoc :file-id typography-file)) + (get-in [typography-file-id :data :typographies typography-id]) + (assoc :file-id typography-file-id)) (and typography-id (not= typography-id :multiple) - (= typography-file file-id)) + (= typography-file-id file-id)) (get typographies typography-id)))) on-convert-to-typography @@ -297,9 +297,9 @@ [:div {:class (stl/css :element-content)} (cond typography - [:& typography-entry {:typography typography - :local? (= typography-file file-id) - :file (get shared-libs typography-file) + [:& typography-entry {:file-id typography-file-id + :typography typography + :local? (= typography-file-id file-id) :on-detach handle-detach-typography :on-change handle-change-typography}]