From 9898ad199144a55e08396aa3b78e61221b4e6923 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 12 Jan 2024 12:15:00 +0100 Subject: [PATCH] :bug: Fix layout button remove showing always --- .../sidebar/options/menus/layout_container.cljs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs index d6332d87ca..dff6d0888e 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs @@ -913,9 +913,10 @@ [:button {:class (stl/css :layout-option) :on-click set-flex} "Flex layout"] [:button {:class (stl/css :layout-option) :on-click set-grid} "Grid layout"]]]]) - [:button {:class (stl/css :remove-layout) - :on-click on-remove-layout} - i/remove-refactor]] + (when has-layout? + [:button {:class (stl/css :remove-layout) + :on-click on-remove-layout} + i/remove-refactor])] [:div {:class (stl/css :title-actions)} (if ^boolean grid-enabled? @@ -933,9 +934,10 @@ :data-value "flex" :on-click on-set-layout} i/add-refactor]) - [:button {:class (stl/css :remove-layout) - :on-click on-remove-layout} - i/remove-refactor]])]] + (when has-layout? + [:button {:class (stl/css :remove-layout) + :on-click on-remove-layout} + i/remove-refactor])])]] (when (and open? has-layout?) (when (not= :multiple layout-type)