Debug: Agregar logs para detectar problema con target='_blank'
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 58s

- Agregar logs en useDeviceType para ver detección de desktop
- Agregar logs en shouldOpenInNewTab para ver resultado
- Esto ayudará a diagnosticar por qué no se abren nuevas ventanas
This commit is contained in:
2025-10-17 05:06:47 -06:00
parent b7d9e0f9cd
commit d08bd81c73
2 changed files with 18 additions and 1 deletions

View File

@@ -13,9 +13,19 @@ export const useDeviceType = () => {
// Establecer valor inicial
isDesktop.value = mediaQuery.matches
console.log('[useDeviceType] Initialized:', {
isDesktop: isDesktop.value,
windowWidth: window.innerWidth,
mediaQueryMatches: mediaQuery.matches
})
// Escuchar cambios en el tamaño de pantalla
const handleChange = (e: MediaQueryListEvent) => {
isDesktop.value = e.matches
console.log('[useDeviceType] Changed:', {
isDesktop: isDesktop.value,
windowWidth: window.innerWidth
})
}
mediaQuery.addEventListener('change', handleChange)