Skip to content

Commit

Permalink
Add option to hide labeling button
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr committed Sep 4, 2024
1 parent 9ddced8 commit 8df25be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/src/pages/detail/detailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const DetailPage: FC = () => {
const user = useSelector((state: ReduxRootState) => state.core_user);
const location = useLocation();
const { panelPosition, panelOpen, togglePanel } = useLabelingContext();
const showLabeling = false;

useEffect(() => {
setEditingEnabled(borehole.data.lock !== null);
Expand Down Expand Up @@ -68,7 +69,9 @@ export const DetailPage: FC = () => {
width: panelOpen && panelPosition === "right" ? "50%" : "100%",
height: panelOpen && panelPosition === "bottom" ? "50%" : "100%",
}}>
<LabelingToggleButton panelOpen={panelOpen} panelPosition={panelPosition} onClick={() => togglePanel()} />
{showLabeling && (
<LabelingToggleButton panelOpen={panelOpen} panelPosition={panelPosition} onClick={() => togglePanel()} />
)}
<DetailPageContent {...props} />
</MainContentBox>
{panelOpen && <LabelingPanel />}
Expand Down

0 comments on commit 8df25be

Please sign in to comment.