From bdac55bbc7800a0bdad1d303cec5e5f158f71944 Mon Sep 17 00:00:00 2001 From: Nurfog Date: Thu, 9 Apr 2026 10:29:32 -0400 Subject: [PATCH] fix(learning): prioritize lesson content on small screens --- .../courses/[id]/lessons/[lessonId]/page.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/web/experience/src/app/courses/[id]/lessons/[lessonId]/page.tsx b/web/experience/src/app/courses/[id]/lessons/[lessonId]/page.tsx index e43ab5f..273ffc1 100644 --- a/web/experience/src/app/courses/[id]/lessons/[lessonId]/page.tsx +++ b/web/experience/src/app/courses/[id]/lessons/[lessonId]/page.tsx @@ -31,8 +31,8 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les const [lesson, setLesson] = useState(null); const [course, setCourse] = useState<(Course & { modules: Module[] }) | null>(null); const [loading, setLoading] = useState(true); - const [sidebarOpen, setSidebarOpen] = useState(true); - const [transcriptOpen, setTranscriptOpen] = useState(true); + const [sidebarOpen, setSidebarOpen] = useState(false); + const [transcriptOpen, setTranscriptOpen] = useState(false); const [notesOpen, setNotesOpen] = useState(false); const [currentTime, setCurrentTime] = useState(0); const [userGrade, setUserGrade] = useState(null); @@ -69,6 +69,15 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les fetchAll(); }, [params.id, params.lessonId, user]); + useEffect(() => { + if (typeof window === "undefined") return; + + // En desktop dejamos el sidebar disponible por defecto. + if (window.innerWidth >= 1024) { + setSidebarOpen(true); + } + }, []); + if (loading) return
Cargando Experiencia...
; if (!lesson || !course) return
Contenido no encontrado.
; @@ -190,7 +199,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
{/* Navigation Sidebar */}