/** * Debug utility for device detection issues */ export function debugDeviceDetection() { if (import.meta.client) { const info = { userAgent: navigator.userAgent, maxTouchPoints: navigator.maxTouchPoints, screenWidth: window.screen.width, screenHeight: window.screen.height, windowWidth: window.innerWidth, windowHeight: window.innerHeight, layoutCookie: document.cookie.split(';').find(c => c.trim().startsWith('layout=')), timestamp: new Date().toISOString() } console.group('🔍 Device Detection Debug Info') console.table(info) console.groupEnd() return info } return null } /** * Force clear mobile layout cookie */ export function clearMobileLayout() { if (import.meta.client) { document.cookie = 'layout=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' console.log('✅ Mobile layout cookie cleared. Please refresh the page.') } } /** * Force set desktop layout */ export function forceDesktopLayout() { if (import.meta.client) { document.cookie = 'layout=desktop; path=/;' console.log('✅ Desktop layout forced. Please refresh the page.') } }