Skip to content

Commit

Permalink
Revert "[front] - feature: add option to hide sidebar toggle button (#…
Browse files Browse the repository at this point in the history
…5360)"

This reverts commit 16c0f99.
  • Loading branch information
flvndvd authored May 30, 2024
1 parent 82afdb5 commit bf530a4
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions front/components/sparkle/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ const SHOW_INCIDENT_BANNER = false;
function ToggleSideBarButton({
isNavigationBarOpened,
toggleNavigationBarVisibility,
hideSidebar,
}: {
isNavigationBarOpened: boolean;
toggleNavigationBarVisibility: (isOpened: boolean) => void;
hideSidebar: boolean;
}) {
const buttonRef = useRef<HTMLDivElement>(null);
const [direction, setDirection] = useState<"left" | "right">("left");
Expand All @@ -60,20 +58,16 @@ function ToggleSideBarButton({
}, [isNavigationBarOpened, toggleNavigationBarVisibility]);

return (
<>
{!hideSidebar && (
<div
ref={buttonRef}
onClick={handleClick}
className={classNames(
"hidden lg:fixed lg:top-1/2 lg:flex lg:w-5",
isNavigationBarOpened ? "lg:left-80" : "lg:left-0"
)}
>
<CollapseButton direction={direction} />
</div>
<div
ref={buttonRef}
onClick={handleClick}
className={classNames(
"hidden lg:fixed lg:top-1/2 lg:flex lg:w-5",
isNavigationBarOpened ? "lg:left-80" : "lg:left-0"
)}
</>
>
<CollapseButton direction={direction} />
</div>
);
}

Expand Down Expand Up @@ -479,7 +473,6 @@ export default function AppLayout({
toggleNavigationBarVisibility={(isVisible) =>
setNavigationBarOpened(isVisible)
}
hideSidebar={hideSidebar}
/>
</div>
</div>
Expand Down

0 comments on commit bf530a4

Please sign in to comment.