This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user