Period Filament
diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx
index 4ede5f234..6264da0c3 100644
--- a/frontend/src/components/Layout.tsx
+++ b/frontend/src/components/Layout.tsx
@@ -8,7 +8,7 @@ import { SwitchbarPopover } from './SwitchbarPopover';
import { useQuery } from '@tanstack/react-query';
import { api, supportApi, pendingUploadsApi } from '../api/client';
import { getIconByName } from './IconPicker';
-import { useIsMobile } from '../hooks/useIsMobile';
+import { useIsSidebarCompact } from '../hooks/useIsSidebarCompact';
import { useAuth } from '../contexts/AuthContext';
import { useToast } from '../contexts/ToastContext';
import { Card, CardHeader, CardContent } from './Card';
@@ -72,7 +72,7 @@ export function Layout() {
const location = useLocation();
const { mode, toggleMode } = useTheme();
const { t } = useTranslation();
- const isMobile = useIsMobile();
+ const isSidebarCompact = useIsSidebarCompact();
const { user, authEnabled, logout, hasPermission } = useAuth();
const { showToast } = useToast();
const [showChangePasswordModal, setShowChangePasswordModal] = useState(false);
@@ -311,12 +311,12 @@ export function Layout() {
localStorage.setItem('sidebarExpanded', String(sidebarExpanded));
}, [sidebarExpanded]);
- // Close mobile drawer on navigation
+ // Close compact drawer on navigation
useEffect(() => {
- if (isMobile) {
+ if (isSidebarCompact) {
setMobileDrawerOpen(false);
}
- }, [location.pathname, isMobile]);
+ }, [location.pathname, isSidebarCompact]);
// Listen for plate detection warnings (objects on plate, print paused)
// Only show to users with printers:control permission
@@ -390,8 +390,8 @@ export function Layout() {
return (
- {/* Mobile Header */}
- {isMobile && (
+ {/* Compact Header */}
+ {isSidebarCompact && (
)}
- {/* Mobile Drawer Backdrop */}
- {isMobile && mobileDrawerOpen && (
+ {/* Compact Drawer Backdrop */}
+ {isSidebarCompact && mobileDrawerOpen && (
setMobileDrawerOpen(false)}
@@ -419,17 +419,17 @@ export function Layout() {
{/* Sidebar / Mobile Drawer */}