From c77b62db19c90fc22732a76a289adc88ba3c16ec Mon Sep 17 00:00:00 2001 From: Vishnu Date: Thu, 15 May 2025 10:30:37 +0530 Subject: [PATCH] refactor: Update element IDs for better clarity and consistency across components --- .../layout/sidebarRight/SideBarRight.tsx | 6 +- .../components/ActionsList.tsx | 7 +- .../versionHisory/VersionHistory.tsx | 1 + app/src/components/ui/Tools.tsx | 2 +- app/src/components/ui/list/List.tsx | 2 +- app/src/modules/market/Card.tsx | 2 +- app/src/modules/market/FilterSearch.tsx | 2 +- .../modules/simulation/compare/compare.tsx | 1 + .../visualization/template/Templates.tsx | 8 +- .../widgets/panel/AddButtons.tsx | 208 ++++++++---------- 10 files changed, 108 insertions(+), 131 deletions(-) diff --git a/app/src/components/layout/sidebarRight/SideBarRight.tsx b/app/src/components/layout/sidebarRight/SideBarRight.tsx index c027bdb..8b926d7 100644 --- a/app/src/components/layout/sidebarRight/SideBarRight.tsx +++ b/app/src/components/layout/sidebarRight/SideBarRight.tsx @@ -83,7 +83,7 @@ const SideBarRight: React.FC = () => { {activeModule === "simulation" && ( <> - {selectedPointData.actions.length > 1 && ( + {selectedPointData?.actions?.length > 1 && ( + - {/* Extra Buttons */} - {selectedZone.activeSides.includes(side) && ( -
= ({ : "" } `} + > + {/* Hide Panel */} + - {/* Clean Panel */} -
cleanPanel(side)} - style={{ - cursor: - hiddenPanels[selectedZone.zoneId]?.includes(side) || - selectedZone.lockedPanels.includes(side) - ? "not-allowed" - : "pointer", - }} - > - -
- - {/* Lock/Unlock Panel */} -
cleanPanel(side)} + style={{ + cursor: + hiddenPanels[selectedZone.zoneId]?.includes(side) || selectedZone.lockedPanels.includes(side) - ? "Unlock Panel" - : "Lock Panel" + ? "not-allowed" + : "pointer", + }} + > + + + + {/* Lock/Unlock Panel */} +
-
- )} - - ))} - - + /> + + + )} + + ))} + ); };