This commit is contained in:
2026-07-08 07:52:34 +00:00
parent d6a8fb6353
commit 4f3b805b8c
30 changed files with 176 additions and 206 deletions

View File

@@ -27,7 +27,7 @@ export default function useLayoutInit() {
// Destroy ALL existing swiper instances to prevent duplicates
document.querySelectorAll('.swiper').forEach(el => {
if (el.swiper) {
try { el.swiper.destroy(true, true) } catch (e) {}
try { el.swiper.destroy(true, true) } catch (e) { console.warn('useLayoutInit: swiper destroy failed:', e) }
}
})
@@ -55,7 +55,7 @@ export default function useLayoutInit() {
}
rafId = requestAnimationFrame(poll)
// Fallback timeout (8 seconds)
// Fallback timeout (3 seconds)
const fallback = setTimeout(() => {
if (!destroyed) {
window.__layoutReady = true
@@ -63,7 +63,7 @@ export default function useLayoutInit() {
destroyed = true
if (rafId) cancelAnimationFrame(rafId)
}
}, 8000)
}, 3000)
return () => {
destroyed = true