Corrigido estado de curtidas na interface do aluno e crash do modal do admin
Build and Deploy (Gitea) / build-and-deploy (push) Successful in 59s Details

This commit is contained in:
Sidney Gomes 2026-07-25 11:33:12 -03:00
parent 99f7b8b9ee
commit c616362e0f
2 changed files with 2 additions and 1 deletions

View File

@ -1560,7 +1560,7 @@ export default function AdminDashboard({ token, adminUser, onLogout }: AdminDash
const isUnlocked = !course.isLocked || selectedStudentDetails.unlockedCourses?.includes(course.id);
if (!isUnlocked) return null;
const courseLessons = course.modules.flatMap(m => m.lessons) || [];
const courseLessons = course.modules?.flatMap(m => m.lessons) || [];
const studentReactions = selectedStudentDetails.lessonReactions || [];
const studentProgress = selectedStudentDetails.progress || [];

View File

@ -157,6 +157,7 @@ export default function CourseView({ courseId, token, onBack, initialLessonId }:
})
};
}));
setActiveLesson(prev => prev ? { ...prev, reaction: type } : null);
}
} catch (err) {
console.error('Error saving reaction:', err);