From e641e93fd583d99464b81e9f458132fb5ddf7d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 5 Nov 2024 15:08:09 +0100 Subject: [PATCH] :bug: Fix sidebar tabs when there are no design tokens --- .../src/app/main/ui/workspace/sidebar.cljs | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar.cljs b/frontend/src/app/main/ui/workspace/sidebar.cljs index 26a02f5ea..6886108a0 100644 --- a/frontend/src/app/main/ui/workspace/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar.cljs @@ -102,23 +102,30 @@ (mf/html [:& assets-toolbox {:size (- size 58)}]) tokens-tab - (mf/html [:& tokens-sidebar-tab]) + (when design-tokens? + (mf/html [:& tokens-sidebar-tab])) tabs (if ^boolean mode-inspect? #js [#js {:label (tr "workspace.sidebar.layers") :id "layers" :content layers-tab}] - #js [#js {:label (tr "workspace.sidebar.layers") - :id "layers" - :content layers-tab} - #js {:label (tr "workspace.toolbar.assets") - :id "assets" - :content assets-tab} - (when design-tokens? + (if ^boolean design-tokens? + #js [#js {:label (tr "workspace.sidebar.layers") + :id "layers" + :content layers-tab} + #js {:label (tr "workspace.toolbar.assets") + :id "assets" + :content assets-tab} #js {:label "Tokens" :id "tokens" - :content tokens-tab})])] + :content tokens-tab}] + #js [#js {:label (tr "workspace.sidebar.layers") + :id "layers" + :content layers-tab} + #js {:label (tr "workspace.toolbar.assets") + :id "assets" + :content assets-tab}]))] [:& (mf/provider muc/sidebar) {:value :left} [:aside {:ref parent-ref