fix
All checks were successful
Deploy on Master Change / deploy (push) Successful in 48s

This commit is contained in:
2026-07-03 22:51:56 +07:00
parent f18d953a3a
commit f67fc157ed

View File

@@ -107,11 +107,15 @@ function App() {
});
const toggleSidebarCollapse = () => {
// On mobile (<=900px), just close the sidebar overlay
if (window.innerWidth <= 900) {
setSidebarOpen(false);
return;
}
// On desktop, toggle collapsed state
const nextVal = !sidebarCollapsed;
setSidebarCollapsed(nextVal);
localStorage.setItem('sc_sidebar_collapsed', String(nextVal));
// On mobile, also close sidebar overlay when collapsing
if (nextVal) setSidebarOpen(false);
};
const [myClasses, setMyClasses] = useState<{ id: number; name: string; code: string }[]>(() => {
try {