diff --git a/src/app.tsx b/src/app.tsx
index 98dca31..afd4516 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -31,12 +31,6 @@ function AppLayout(props: { children: any }) {
let lastScrollY = 0;
const SCROLL_THRESHOLD = 100;
- // Compute left margin reactively
- const leftMargin = () => {
- const isMobile = typeof window !== "undefined" && window.innerWidth < 768;
- return isMobile ? 0 : leftBarSize();
- };
-
createEffect(() => {
const handleResize = () => {
const isMobile = window.innerWidth < 768; // md breakpoint
@@ -47,9 +41,7 @@ function AppLayout(props: { children: any }) {
setRightBarVisible(true);
}
- // On mobile, leftbar overlays (don't subtract its size)
- const leftOffset = isMobile ? 0 : leftBarSize();
- const newWidth = window.innerWidth - leftOffset - rightBarSize();
+ const newWidth = window.innerWidth - leftBarSize() - rightBarSize();
setCenterWidth(newWidth);
};
@@ -63,10 +55,7 @@ function AppLayout(props: { children: any }) {
// Recalculate when bar sizes change (visibility or actual resize)
createEffect(() => {
- const isMobile = window.innerWidth < 768;
- // On mobile, leftbar overlays (don't subtract its size)
- const leftOffset = isMobile ? 0 : leftBarSize();
- const newWidth = window.innerWidth - leftOffset - rightBarSize();
+ const newWidth = window.innerWidth - leftBarSize() - rightBarSize();
setCenterWidth(newWidth);
});
@@ -170,31 +159,13 @@ function AppLayout(props: { children: any }) {
return (
<>
-