just show it

This commit is contained in:
Michael Freno
2025-12-21 23:54:35 -05:00
parent 3832269a96
commit 4d549e32ba
3 changed files with 3 additions and 13 deletions

View File

@@ -27,8 +27,7 @@ const BarsContext = createContext<{
setRightBarSize: () => {},
centerWidth: () => 0,
setCenterWidth: () => {},
leftBarVisible: () =>
typeof window !== "undefined" ? window.innerWidth >= 768 : true,
leftBarVisible: () => true,
setLeftBarVisible: () => {},
rightBarVisible: () => true,
setRightBarVisible: () => {},
@@ -59,16 +58,7 @@ export function BarsProvider(props: { children: any }) {
onMount(() => {
// Immediately sync to actual window width
setWindowWidth(window.innerWidth);
const initialIsMobile = isMobile(window.innerWidth);
setLeftBarVisible(!initialIsMobile);
// Initialize immediately on mobile if left bar starts hidden
if (initialIsMobile && !leftBarVisible()) {
leftBarSized = true;
checkAndSync();
}
// Setup resize listener
const handleResize = () => {
setWindowWidth(window.innerWidth);
};